Most Popular
1500 questions
96
votes
2 answers
Which distributions have $HOME/.local/bin in $PATH?
For example, in Ubuntu, there is always a .local directory in the home directory and .profile includes this line:
PATH="$HOME/bin:$HOME/.local/bin:$PATH"
$HOME/.local/bin does not exist by default, but if it is created it's already in $PATH and…
Stoffe
- 1,063
- 1
- 7
- 6
96
votes
2 answers
What does "set --" do in this Dockerfile entrypoint?
I'm trying to understand what this Docker entrypoint does.
It seems to me that's a very common pattern when writing Dockerfiles, but my bash skills are limited and I have no idea of all the special bash symbols kung fu.
Also, it's hard to google…
Lucas Pottersky
- 1,063
- 1
- 8
- 6
96
votes
1 answer
Why is nullglob not default?
In most shells nullglob isn't the default. That means, for example, if you run this command
ls *
in an empty directory, it will expand the * glob to a literal *, instead to an empty list of arguments. There are ways to change that behaviour, so…
Dakkaron
- 1,997
- 2
- 16
- 25
96
votes
3 answers
Bash: run command2 if command1 fails
I want to do something like this:
if cmd1 && cmd2
echo success
else
echo epic fail
fi
How should I do it?
michelemarcon
- 3,357
- 10
- 32
- 37
96
votes
14 answers
How to remove all the files in a directory?
I am trying to remove all files and subdirectories in a directory. I used rm -r to remove all files, but I want to remove all files and subdirectories, excluding the top directory itself.
For example, I have a top directory like images. It contains…
whiterose
- 1,069
- 1
- 7
- 4
96
votes
6 answers
How do I refresh Gnome 3 applications
I just added and modified a .desktop file in my /home/user/.local/share/applications folder.
Is there any way to refresh the icon and caption in the list of applications without logging out?
Peter Turner
- 1,754
- 3
- 20
- 34
96
votes
3 answers
Why is the root directory denoted by a / sign?
I have done some research about this on Google, but the results were cloudy. Why is the / sign used to denote the root directory. Are there any solid reasons behind it?
Ruban Savvy
- 8,409
- 8
- 29
- 43
96
votes
13 answers
Meaning of “Connection closed by xxx [preauth]” in sshd logs
We have a Windows batch script, which connects automatically to a linux server via PLINK (putty). There is NO public private key authentication, the user and the password are in
the script.
On our linux server we have several sshd log entries…
Wolfgang Adamec
- 1,353
- 4
- 12
- 14
96
votes
3 answers
What is the point of the `yes` command?
This question concerns the yes command found in UNIX and Linux machines: Basically, what is the point (if any) and history of this tool? Are there practical applications for it? Can an example be shown where it is useful in a script or chained (via…
Jaryd Malbin
- 1,031
- 1
- 7
- 7
95
votes
4 answers
What is the meaning of 0.0.0.0 as a gateway?
Can anyone clarify gateway assignment for me?
What is the difference between adding a gateway as 0.0.0.0 and assigning a specific IP address as a gateway?
user2720323
- 3,549
- 7
- 24
- 26
95
votes
2 answers
Is there an easy way to "restart" a tmux pane?
Assume I have a tmux (1.7) window split as follows:
________________________
| 1 |
| |
|-----------+------------|
| 2 | 3 |
|___________|____________|
Now, the vertical sizes have been…
0xC0000022L
- 16,189
- 24
- 102
- 168
95
votes
9 answers
How can I check what signals a process is listening to?
How can I verify whether a running process will catch a signal, or ignore it, or block it? Ideally I'd like to see a list of signals, or at least not have to actually send the signal to check.
Jander
- 16,272
- 6
- 50
- 66
95
votes
9 answers
Is there a tool that combines zcat and cat transparently?
When handling log files, some end up as gzipped files thanks to logrotate and others not. So when you try something like this:
$ zcat *
you end up with a command line like zcat xyz.log xyz.log.1 xyz.log.2.gz xyz.log.3.gz and then with:
gzip:…
0xC0000022L
- 16,189
- 24
- 102
- 168
95
votes
2 answers
What does the Chromium option `--no-sandbox` mean?
I'm running Chromium like so : chromium --no-sandbox
I'm doing this because I'm running Debian Squeeze on an OpenVZ VM Container and it's the only way I can get it to work.
Though I keep reading this is terrible. But I want to know why exactly. Can…
capdragon
- 1,157
- 1
- 9
- 12
95
votes
7 answers
Move all files with a certain extension from multiple subdirectories into one directory
I have a bunch of .zip files in several directories:
Fol1/Fol2
Fol3
Fol4/Fol5
How would I do move them all to a common base folder?
InquilineKea
- 6,152
- 12
- 43
- 42