Most Popular
1500 questions
309
votes
5 answers
What is the difference between `grep`, `egrep`, and `fgrep`?
Can anyone tell me the technical differences between grep, egrep, and fgrep and provide suitable examples?
When do I need to use grep over egrep and vice versa?
Vishwanath Dalvi
- 4,346
- 5
- 20
- 17
306
votes
16 answers
How to monitor CPU/memory usage of a single process?
I would like to monitor one process's memory / cpu usage in real time. Similar to top but targeted at only one process, preferably with a history graph of some sort.
Josh K
- 3,866
- 4
- 22
- 15
303
votes
6 answers
Multiple similar entries in ssh config
Say I want to configure my ssh options for 30 servers with the same setup in my .ssh config file:
host XXX
HostName XXX.YYY.com
User my_username
Compression yes
Ciphers arcfour,blowfish-cbc
Protocol 2
ControlMaster…
Amelio Vazquez-Reina
- 40,169
- 77
- 197
- 294
302
votes
12 answers
How to check how long a process has been running?
I would like to avoid doing this by launching the process from a monitoring app.
tshepang
- 64,472
- 86
- 223
- 290
299
votes
2 answers
View stdout/stderr of systemd service
I have created a simple systemd service file for a custom application. The application works well when I run it manually, but my CPU gets maxed out when I run it with systemd.
I'm trying do track down where my problem is, but I don't know where to…
beatgammit
- 7,453
- 10
- 31
- 32
299
votes
7 answers
Moving tmux pane to window
How do I move an existing pane into another window in tmux when I have multiple windows, and vice versa?
I'm coming from screen, where I can switch to the pane and then switch windows until I get to the one I want; tmux does not seem to allow this.
mrlanrat
- 3,093
- 2
- 15
- 5
298
votes
2 answers
What's ssh port forwarding and what's the difference between ssh local and remote port forwarding
I feel confused about ssh port forwarding and the difference between ssh local and remote port forwarding. Could you please explain them in detail and with examples? Thanks!
user2886717
- 3,339
- 5
- 17
- 14
295
votes
6 answers
How to avoid being asked passphrase each time I push to Bitbucket
I set up my ssh stuff with the help of this guide, and it used to work well (I could run hg push without being asked for a passphrase). What could have happened between then and now, considering that I'm still using the same home directory.
$ cat…
tshepang
- 64,472
- 86
- 223
- 290
294
votes
11 answers
Keep processes running after SSH session disconnects
I sometimes have long running processes that I want to kick off before going home, so I create a SSH session to the server to start the process, but then I want to close my laptop and go home and later, after dinner, I want to check on the process…
λ Jonas Gorauskas
- 3,550
- 3
- 20
- 19
294
votes
4 answers
What is the meaning of IFS=$'\n' in bash scripting?
At the beginning of a bash shell script is the following line:
IFS=$'\n'
What is the meaning behind this collection of symbols?
Abdul Al Hazred
- 25,760
- 23
- 64
- 88
294
votes
6 answers
How to create a new window on the current directory in tmux?
Is is possible to open a new-window with its working directory set to the one I am currently in. I am using zsh, if it matters.
sharat87
- 4,199
- 4
- 23
- 17
293
votes
9 answers
How to display meminfo in megabytes in top?
Sometimes it is not comfortable to see meminfo in kilobytes when you have several gigs of RAM. In Linux, it looks like:
And here is how it looks in Mac OS X:
Is there a way to display meminfo in Linux top in terabytes, gigabytes and megabytes?
Anthony Ananich
- 7,234
- 5
- 31
- 45
292
votes
7 answers
How to go to the previous working directory in terminal?
In terminal, how can I define a key to go to the previous directory which I was in when changing directory with the cd command?
For example, I'm in /opt/soft/bin and I cd into /etc/squid3 and I want to get back to the first directory.
Hojat Taheri
- 5,026
- 6
- 23
- 22
291
votes
5 answers
What are the differences between most, more and less?
I'm now using Arch Linux, and find a command most works like more and less. To understand the differences between them is a confusing problem. The question Isn't less just more? mentions the differences between less and more. Do you know the…
Hgtcl
- 3,021
- 2
- 13
- 7
290
votes
2 answers
How to write startup script for Systemd?
I have 2 graphics cards on my laptop. One is IGP and another discrete.
I've written a shell script to to turn off the discrete graphics card.
How can I convert it to systemd script to run it at start-up?
Sharique
- 3,113
- 3
- 16
- 8