Most Popular
1500 questions
1824
votes
3 answers
Why does man print "gimme gimme gimme" at 00:30?
We've noticed that some of our automatic tests fail when they run at 00:30 but work fine the rest of the day. They fail with the message
gimme gimme gimme
in stderr, which wasn't expected. Why are we getting this output?

Jaroslav Kucera
- 9,007
- 5
- 13
- 27
1508
votes
10 answers
What is the exact difference between a 'terminal', a 'shell', a 'tty' and a 'console'?
I think these terms almost refer to the same thing, when used loosely:
terminal
shell
tty
console
What exactly does each of these terms refer to?

Lazer
- 33,497
- 24
- 68
- 74
1473
votes
16 answers
How do I get the size of a directory on the command line?
I tried to obtain the size of a directory (containing directories and sub directories) by using the ls command with option l. It seems to work for files (ls -l file name), but if I try to get the size of a directory (for instance, ls -l /home), I…

Abdul Al Hazred
- 23,792
- 22
- 62
- 85
1274
votes
12 answers
How to correctly add a path to PATH?
I'm wondering where a new path has to be added to the PATH environment variable. I know this can be accomplished by editing .bashrc (for example), but it's not clear how to do this.
This way:
export PATH=~/opt/bin:$PATH
or this?
export…

Paolo
- 16,105
- 10
- 29
- 40
1128
votes
10 answers
How to copy files from one machine to another using ssh
I'm using Linux (centos) machine, I already connected to the other system using ssh. Now my question is how can I copy files from one system to another system?
Suppose, in my environment, I have two system like System A and System B. I'm using…

user3021349
- 14,809
- 8
- 18
- 21
1069
votes
9 answers
How to install a deb file, by dpkg -i or by apt?
I have a deb package for installation.
Shall I install by dpkg -i my.deb, or by apt?
Will both handle the software dependency problem well?
If by apt, how can I install from the deb by apt?

Tim
- 92,534
- 165
- 512
- 896
921
votes
10 answers
How can I replace a string in a file(s)?
Replacing strings in files based on certain search criteria is a very common task. How can I
replace string foo with bar in all files in the current directory?
do the same recursively for sub directories?
replace only if the file name matches…

terdon
- 220,769
- 58
- 415
- 622
901
votes
3 answers
How to unfreeze after accidentally pressing Ctrl-S in a terminal?
It's a situation that has happened quite often to me: after I press (with a different intention) Ctrl-S in a terminal, the interaction (input or output) with it is frozen. It's probably a kind of "scroll lock" or whatever.
How do I unfreeze the…

imz -- Ivan Zakharyaschev
- 14,533
- 12
- 58
- 118
845
votes
2 answers
Why was '~' chosen to represent the home directory?
I have often wondered why the ~ (tilde) represents the home directory of a user. Is there a reason behind this, or is it just some infrequently used character?

Lelouch Lamperouge
- 6,859
- 3
- 14
- 11
830
votes
6 answers
How to see full log from systemctl status service?
I check service status with systemctl status service-name.
By default, I see few rows only, so I add -n50 to see more.
Sometimes, I want to see full log, from start. It could have 1000s of rows.
Now, I check it with -n10000 but that doesn't look…

10robinho
- 8,629
- 4
- 14
- 16
782
votes
13 answers
How do I grep for multiple patterns with pattern having a pipe character?
I want to find all lines in several files that match one of two patterns. I tried to find the patterns I'm looking for by typing
grep (foo|bar) *.txt
but the shell interprets the | as a pipe and complains when bar isn't an executable.
How can I…

Dan
- 9,122
- 5
- 24
- 38
780
votes
2 answers
How do I make `ls` show file sizes in megabytes?
What commands do I need for Linux's ls to show the file size in MB?

Paul Sheldrake
- 7,913
- 3
- 13
- 10
752
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
- 13,563
- 12
- 34
- 49
744
votes
6 answers
How to run find -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
- 29,573
- 43
- 82
- 90
740
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