Most Popular
1500 questions
92
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,567
92
votes
12 answers
Why is Linux's filesystem designed as a single directory tree?
Can anyone explain why Linux is designed as a single directory tree?
Whereas in Windows we can have multiple drives like C:\, and D:\, there is a single root in Unix. Any specific reason there?

user2720323
- 3,589
92
votes
6 answers
How to edit command line in full screen editor in ZSH?
In bash, using vi mode, if I hit Esc,v, my current command line is opened in the editor specified by $EDITOR and I am able to edit it in full screen before 'saving' the command to be returned to the shell and executed.
How can I achieve similar…

Murali Suriar
- 2,824
92
votes
7 answers
"trap ... INT TERM EXIT" really necessary?
Many examples for trap use trap ... INT TERM EXIT for cleanup tasks. But is it really necessary to list all the three sigspecs?
The manual says:
If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell.
which I believe applies whether…

musiphil
- 1,611
- 2
- 14
- 16
92
votes
3 answers
Linux network troubleshooting and debugging
From time to time, Linux and Unix users are faced with various network problems. Many of these problems are presented here and at some other troubleshooting forums, but they are very concrete and contain a lot of additional technical information,…

Alex R
- 2,351
92
votes
6 answers
What is the difference between kernel drivers and kernel modules?
When I do a lspci -k on my Kubuntu with a 3.2.0-29-generic kernel I can see something like this:
01:00.0 VGA compatible controller: NVIDIA Corporation G86 [Quadro NVS 290] (rev a1)
Subsystem: NVIDIA Corporation Device 0492
Kernel driver in…

JohnnyFromBF
- 3,496
92
votes
3 answers
The 'less' command-line equivalent of 'tail -f'
I would like to open up a file using less, and have it automatically scroll the file similar to tail -f.
I know that I can do less file, and then hit Shift-F to forward forever; like tail -f.
I need less because it provides the --raw-control-chars…

Stefan Lasiewski
- 19,754
- 24
- 70
- 85
92
votes
3 answers
What do the "buff/cache" and "avail mem" fields in top mean?
Within the output of top, there are two fields, marked "buff/cache" and "avail Mem" in the memory and swap usage lines:
What do these two fields mean?
I've tried Googling them, but the results only bring up generic articles on top, and they don't…
user48923
92
votes
7 answers
Can I pipe stdout on one server to stdin on another server?
stdout on one CentOS server needs to be piped to stdin on another CentOS server. Is this possible?
Update
ScottPack, MikeyB and jofel all have valid answers. I awarded the answer to Scott because, even though my question didn't specify security as a…

Wesley
- 14,263
92
votes
5 answers
Combining tail && journalctl
I'm tailing logs of my own app and postgres.
tail -f /tmp/myapp.log /var/log/postgresql/postgresql.main.log
I need to include pgpool's logs. It used to be syslog but now it is in journalctl.
Is there a way to tie tail -f && journalctl -f together?

bikey
- 921
92
votes
1 answer
Why does the following script delete itself?
If you create an executable file with the following contents, and run it, it will delete itself.
How does this work?
#!/bin/rm

user253751
- 2,266
92
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,599
- 2
- 15
- 10
92
votes
6 answers
Execute shell commands in Python
I'm currently studying penetration testing and Python programming. I just want to know how I would go about executing a Linux command in Python. The commands I want to execute are:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING…

Xanmashi
- 1,053
92
votes
4 answers
Why are network interfaces not in /dev like other devices?
I'm mostly curious, but why aren't network interfaces in /dev?
Are there any other kinds of devices that aren't represented as a node under /dev?

andyortlieb
- 1,021
92
votes
5 answers
Xfce entered zoom mode. How do I exit?
I pressed something around my mouse pad (keys in the altgr region+mousepad - quite possibly multitouch) and suddenly the whole X11 display zoomed around 10%. That means I can see 90% of the 1920x1080 screen in a somewhat blurry version. When I move…

Ole Tange
- 35,514