Most Popular
1500 questions
129
votes
4 answers
How to update Linux "locate" cache
How can I update the cache / index of locate? I installed new packages and the files are clearly not yet indexed.
So which command do I have to commit, in order for the indexer to trigger?
I'm currently working on debian jessie (testing):
with Linux…
sweisgerber.dev
- 1,421
- 2
- 12
- 9
129
votes
2 answers
What is a tainted Linux kernel?
Under certain conditions, the Linux kernel may become tainted. For example, loading a proprietary video driver into the kernel taints the kernel. This condition may be visible in system logs, kernel error messages (oops and panics), and through…
bwDraco
- 3,213
- 3
- 15
- 15
128
votes
3 answers
What do the scripts in /etc/profile.d do?
I am reading about basic shell scripting from Linux Command Line and Shell Scripting Bible.
It says that the /etc/profile file sets the environment variables at startup of the Bash shell. The /etc/profile.d directory contains other scripts that…
asheeshr
- 1,897
- 2
- 18
- 23
128
votes
6 answers
watch command alias expansion
If a run the watch command containing an alias, it will not expand the alias. I have tried both with single quote and double quotes, in fact given the following alias:
# alias ll
alias ll='ls -l --color=tty'
The following command will fail
# watch…
ztank1013
- 2,161
- 2
- 13
- 14
128
votes
2 answers
timestamp, modification time, and created time of a file
I just know that ls -t and ls -f give different sorting of files and subdirectories under a directory.
What are the differences between timestamp, modification time, and created time of a file?
How to get and change these kinds of information by…
Tim
- 98,580
- 191
- 570
- 977
128
votes
7 answers
How are "/dev" Linux files created?
There are special files in Linux that are not really files.
The most notable and clear examples of these are in the dev folder, "files" like:
/dev/null - Ignores anything you write to the file
/dev/random - Outputs random data instead of the…
IQAndreas
- 10,145
- 21
- 59
- 79
128
votes
9 answers
Search for a previous command with the prefix I just typed
We can use up and down arrow to navigate in command history.
In some IDEs, such as Matlab, if we input something and then press the arrow keys, we scroll among only the history commands starting with what we have input. That's really convenient, but…
wsdzbm
- 2,786
- 4
- 19
- 27
127
votes
17 answers
How do I find how long ago a Linux system was installed?
How can I find the time since a Linux system was first installed, provided that nobody has tried to hide it?
user4518
127
votes
5 answers
Unable to locate package `docker-ce` on a 64bit ubuntu
I'm trying to install Docker on a Ubuntu 64 machine following the official installation guide.
Sadly Ubuntu seems it is not able to locate the docker-ce package. Any idea to fix it or at least to track what is happening ?
Here some details for…
danidemi
- 1,553
- 2
- 11
- 8
127
votes
7 answers
Using --exclude with the du command
This is probably something basic but I'm not able to make it work. I'm trying to use DU to get a total size of files minus certain directories. I need to exclude one specific directory called uploads but not every directory called uploads. For…
Will
- 1,373
- 2
- 8
- 5
127
votes
12 answers
How to copy text from vim to an external program?
I'm trying to copy-paste some text from vim. I'm doing v to enter visual mode, then y once I selected my block.
It appears to copy the text into vim's clipboard, because p will paste it.
But in another program (e.g. Chrome), right-click->paste…
ripper234
- 31,063
- 43
- 82
- 90
127
votes
6 answers
What is the right file permission for a .pem file to SSH and SCP
I have tried to SSH into my AWS Ubuntu server and copy the directory to my local machine. Throughout the process I experience different file permission errors (noted below).
Is there one specific file permission needed for the .pem file that…
George Jester
- 1,371
- 2
- 9
- 4
126
votes
3 answers
What does it mean to have a $"dollarsign-prefixed string" in a script?
I just saw this in an init script:
echo $"Stopping Apache"
What is that dollar-sign for?
My research so far:
I found this in the bash manual:
extquote
If set, $'string' and $"string" quoting is performed within ${parameter} expansions enclosed in…
Ed Brannin
- 1,363
- 2
- 9
- 6
126
votes
9 answers
How to install Python 3.6?
I'd like to install the latest Python, which is 3.6 at the time of this post. However, the repository is saying that Python 3.4.2 is the newest version.
I've tried:
$ sudo apt-get update
$ sudo apt-get install python3
python3 is already the newest…
davidtgq
- 1,494
- 2
- 10
- 10
126
votes
12 answers
How to avoid conflicts between dnsmasq and systemd-resolved?
I recently installed dnsmasq to act as DNS Server for my local network. dnsmasq listens on port 53 which is already in use by the local DNS stub listener from systemd-resolved.
Just stopping systemd-resolved and then restart it after dnsmasq is…
vic
- 2,012
- 4
- 14
- 23