Most Popular
1500 questions
133
votes
5 answers
Match exact string using grep
I have a text file:
deiauk 1611516 afsdf 765
minkra 18415151 asdsf 4152
linkra sfsfdsfs sdfss 4555
deiauk1 sdfsfdsfs 1561 51
deiauk2 115151 5454 4
deiauk 1611516 afsdf ddfgfgd
luktol1 4545 4 9
luktol 1
and I want to match exactly deiauk. When I do…

user3334375
- 1,795
133
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,461
132
votes
8 answers
How can get the creation date of a file?
I want to find out the creation date of a particular file on a Linux system. Not the modification date or access date, the creation date.
I have tried with ls -ltrh and stat filename but neither gives me what I need. What else can I do to get this…

Özzesh
- 3,669
132
votes
6 answers
How to properly and easily configure `xdg-open` without any environment?
I'm using OpenBox window manager without any desktop environment.
xdg-open behaves strangely. It opens everything with firefox.
$ xdg-settings --list
Known properties:
default-web-browser Default web browser
I'm looking for a simple…

kravemir
- 4,174
132
votes
3 answers
Kill an unresponsive ssh session without closing the terminal
Is there a way to disconnect from an SSH session that has become unresponsive without killing the whole terminal? Specifically I'm using konsole, and the machine I'm working with sometimes hangs, but doesn't actually die (thus killing the…

Falmarri
- 13,047
132
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,836
132
votes
7 answers
How to get whole command line from a process?
How can I get the command arguments or the whole command line from a running process using its process name?
For example this process:
# ps
PID USER TIME COMMAND
1452 root 0:00 /sbin/udhcpc -b -T 1 -A 12 -i eth0 -p…

Michael
- 1,653
131
votes
18 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
131
votes
5 answers
what's the purpose of ssh-agent?
I've read the official definition:
ssh-agent is a program to hold private keys used for public key authentication (RSA, DSA, ECDSA). The idea is that ssh-agent is started in the beginning of an X-session or a login session, and all other windows…

agent_smith
- 1,605
131
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,937
131
votes
7 answers
Create a tar archive split into blocks of a maximum size
I need to backup a fairly large directory, but I am limited by the size of individual files. I'd like to essentially create a tar.(gz|bz2) archive which is split into 200MB maximum archives. Clonezilla does something similar to this by splitting…

Naftuli Kay
- 39,676
131
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,102
131
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
- 101,790
131
votes
10 answers
How to view a specific process in top
Are there any relatively strightforward options with top to track a specific process?
Ideally by identifying the process by a human readable value? e.g. chrome or java.
In other words, I want to view all the typical information top provides, but for…

Michael Coleman
- 1,427
131
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,763