Most Popular
1500 questions
801
votes
40 answers
Tracking down where disk space has gone on Linux?
When administering Linux systems I often find myself struggling to track down the culprit after a partition goes full. I normally use du / | sort -nr but on a large filesystem this takes a long time before any results are returned.
Also, this is…
Owen Fraser-Green
787
votes
3 answers
What is the purpose of the lost+found folder in Linux and Unix?
There is a folder at the root of Linux and Unix operating systems called /lost+found/
What is it for? Under what circumstances would I interact with it? How would I interact with it?

Wesley
- 14,263
785
votes
6 answers
Problem running find: missing argument to `-exec'
I'd like to find the files in the current directory that contain the text "chrome".
$ find . -exec grep chrome
find: missing argument to `-exec'
What am I doing wrong?

ripper234
- 31,763
784
votes
6 answers
Difference between nohup, disown and &
What are the differences between
$ nohup foo
and
$ foo &
and
$ foo &
$ disown

Lesmana
- 27,439
754
votes
6 answers
Zip all files in directory?
Is there a way to zip all files in a given directory with the zip command? I've heard of using *.*, but I want it to work for extensionless files, too.

tkbx
- 10,847
746
votes
8 answers
Finding the PID of the process using a specific port?
I am installing hadoop on my Ubuntu system. When I start it, it reports that port 9000 is busy.
I used:
netstat -nlp|grep 9000
to see if such a port exists and I got this:
tcp 0 0 127.0.0.1:9000 0.0.0.0:* …

wuchang
- 7,907
- 5
- 17
- 16
745
votes
9 answers
What do the numbers in a man page mean?
So, for example, when I type man ls I see LS(1). But if I type man apachectl I see APACHECTL(8) and if I type man cd I end up with cd(n).
I'm wondering what the significance of the numbers in the parentheses are, if they have any.

Wilduck
- 7,577
737
votes
10 answers
How to switch between users on one terminal?
I'd like to log in as a different user without logging out of the current one (on the same terminal). How do I do that?

tshepang
- 65,642
729
votes
30 answers
Why am I still getting a password prompt with ssh with public key authentication?
I'm working from the URL I found here:
http://web.archive.org/web/20160404025901/http://jaybyjayfresh.com/2009/02/04/logging-in-without-a-password-certificates-ssh/
My ssh client is Ubuntu 64 bit 11.10 desktop and my server is Centos 6.2 64 bit. I…

Thom
- 7,855
715
votes
20 answers
How to get execution time of a script effectively?
I would like to display the completion time of a script.
What I currently do is -
#!/bin/bash
date ## echo the date at start
# the script contents
date ## echo the date at end
This just show's the time of start and end of the script. Would it be…

mtk
- 27,530
- 35
- 94
- 130
712
votes
24 answers
Preserve bash history in multiple terminal windows
I consistently have more than one terminal open. Anywhere from two to ten, doing various bits and bobs. Now let's say I restart and open up another set of terminals. Some remember certain things, some forget.
I want a history that:
Remembers…

Oli
- 16,068
709
votes
4 answers
Why is printf better than echo?
I have heard that printf is better than echo. I can recall only one instance from my experience where I had to use printf because echo didn't work for feeding some text into some program on RHEL 5.8 but printf did. But apparently, there are other…

amphibient
- 12,472
- 18
- 64
- 88
688
votes
5 answers
/usr/bin vs /usr/local/bin on Linux
Why are there so many places to put a binary in Linux? There are at least these five:
/bin/
/sbin/
/usr/bin/
/usr/local/bin/
/usr/local/sbin/
And on my office box, I do not have write permissions to some of these.
What type of binary goes into…

Lazer
- 35,307
677
votes
9 answers
How do I zip/unzip on the unix command line?
How can I create and extract zip archives from the command line?

joachim
- 7,687
676
votes
12 answers
How to force ssh client to use only password auth?
If I use pubkey auth from e.g.: an Ubuntu 11.04 how can I set the ssh client to use only password auth to a server? (just needed because of testing passwords on a server, where I default log in with key)
I found a way:
mv ~/.ssh/id_rsa…

LanceBaynes
- 40,135
- 97
- 255
- 351