Most Popular
1500 questions
89
votes
5 answers
How to split window vertically in GNU Screen?
I saw some body split their window to 2x2, I just want to know how to do that? I know the 'split' command in Screen can only split the window horizontally.
Rocky
- 1,559
- 2
- 15
- 10
89
votes
4 answers
What does "esac" mean at the end of a bash case statement? Is it required?
I have found multiple examples of "esac" appearing at the end of a bash case statement but I have not found any clear documentation on it's use. The man page uses it, and even has an index on the word…
GrnMtnBuckeye
- 1,017
- 1
- 7
- 6
89
votes
3 answers
show gateway IP address when performing ifconfig command
Currently, when using the ifconfig command, the following IP addresses are shown:
own IP, broadcast and mask.
Is there a way to show the related gateway IP address as well (on the same screen with all the others, not by using 'route' command)?
amigal
- 1,915
- 1
- 14
- 9
89
votes
25 answers
Tricks and tips for finding information in man pages
Does anyone have any tricks and tips for finding information in man pages?
Casebash
- 1,041
- 2
- 13
- 20
89
votes
4 answers
How to read dmesg from previous session? (dmesg.0)
dmesg is a command to read the contents from /var/log/dmesg.
The nice thing compared to less /var/log/dmesg is that I can use the -T flag for human readable time output.
Now I would like to look at /var/log/dmesg.0, to see how my computer crashed.…
donquixote
- 1,387
- 2
- 13
- 18
89
votes
6 answers
How to check which process is using most memory
When I check free in one of Prod server it showing 70% of memory is being used:
total used free shared buffers cached
Mem: 164923172 141171860 23751312 0 4555616 20648048
-/+ buffers/cache: …
sandeep
- 891
- 1
- 7
- 3
89
votes
9 answers
Can sed replace new line characters?
Is there an issue with sed and new line character?
I have a file test.txt with the following contents
aaaaa
bbbbb
ccccc
ddddd
The following does not work:
sed -r -i 's/\n/,/g' test.txt
I know that I can use tr for this but my question is…
Jim
- 9,750
- 15
- 57
- 84
89
votes
4 answers
What is the difference between a builtin command and one that is not?
Is there any intrinsic difference between a builtin command and another command which can nominally do the same thing?
eg. Do builtins get "special" treatement? ... is there less overhead running them? .. or are they just simply 'built in'; like…
Peter.O
- 32,426
- 28
- 115
- 163
89
votes
5 answers
Where are my sshd logs?
I can't find my sshd logs in the standard places.
What I've tried:
Not in /var/log/auth.log
Not in /var/log/secure
Did a system search for 'auth.log' and found nothing
I've set /etc/ssh/sshd_config to explicitly use SyslogFacility AUTH and LogLevel…
HXCaine
- 1,119
- 1
- 8
- 9
89
votes
7 answers
How can I make iconv replace the input file with the converted output?
I have a bash script which enumerates through every *.php file in a directory and applies iconv to it. This gets output in STDOUT.
Since adding the -o parameter ( in my experience ) actually writes a blank file probably before the conversion takes…
meder omuraliev
- 1,035
- 1
- 7
- 10
88
votes
3 answers
Unhighlight last search in 'less'
When you use a / forward search or a ? backward search in less, all instances of the file get highlighted. After I've found the instance of the word I'm looking for, what is the most correct way to unhighlight something?
Currently I just press /…
VxJasonxV
- 1,507
- 2
- 11
- 12
88
votes
5 answers
What's the difference between pkill and killall?
I know that pkill has more filtering rules than killall. My question is, what is the difference between:
pkill [signal] name
and
killall [signal] name
I've read that killall is more effective and kill all processes and subprocesses (and…
mavillan
- 3,067
- 4
- 22
- 27
88
votes
12 answers
Is there a way to make "mv" fail silently?
A command like mv foo* ~/bar/ produces this message in stderr if there are no files matching foo*.
mv: cannot stat `foo*': No such file or directory
However, in the script I'm working on that case would be completely fine, and I'd like to omit…
Jonik
- 1,460
- 3
- 13
- 17
88
votes
7 answers
How can I page up or down in tmux with Terminal.app?
When I am in tmux only a portion of the text shows up. If I try to scroll up or down the console scrolls up but not the actual text. If I do CTRL+b followed by [, I see in the status bar *tmux, and If I press the up or down arrow I can actually go…
Jim
- 9,750
- 15
- 57
- 84
88
votes
5 answers
Find the owner of a directory or file, but only return that and nothing else
I am looking for a command that will return the owner of a directory and only that--such as a regex parsing the ls -lat command or something similar? I want to use the result in another script.
Jason
- 1,029
- 1
- 7
- 8