Most Popular
1500 questions
116
votes
3 answers
What does `kill -0` do?
I recently came across this in a shell script.
if ! kill -0 $(cat /path/to/file.pid); then
... do something ...
fi
What does kill -0 ... do?
slm
- 363,520
- 117
- 767
- 871
116
votes
4 answers
How can I create a message box from the command line?
How can I create a message box from the command line, either GUI message boxes or message boxes shown inside the terminal?
It would also be interesting to be able to get a simple input back from the user, for example, an input given with radio…
Minimus Heximus
- 2,377
- 6
- 24
- 33
116
votes
5 answers
How to copy the partition layout of a whole disk using standard tools
I want to take a backup of the whole partition layout of a hard drive, including logical drives, so that I can restore that layout to another disk. I do not want to copy the contents of the partitions, only the layout. For the primary and extended…
Lauritz V. Thaulow
- 3,469
- 4
- 23
- 22
115
votes
13 answers
Find duplicate files
Is it possible to find duplicate files on my disk which are bit to bit identical but have different file-names?
student
- 17,875
- 31
- 103
- 169
115
votes
6 answers
On-the-fly monitoring HTTP requests on a network interface?
For debugging purposes I want to monitor the http requests on a network interface.
Using a naive tcpdump command line I get too much low-level information and the information I need is not very clearly represented.
Dumping the traffic via tcpdump…
maxschlepzig
- 56,316
- 50
- 205
- 279
115
votes
14 answers
How to understand what's taking up disk space?
I'm looking for a linux alternative to WinDirStat. I would like to know what is taking up space on my hard drives.
A program that works on console and doesn't require a UI is preferred .
ripper234
- 31,063
- 43
- 82
- 90
115
votes
7 answers
how to avoid ssh asking permission?
We are attempting to speed up the installation of oracle nodes for RAC installation.
this requires that we get ssh installed and configured so that it doesn't prompt for a password.
The problem is:
On first usage, we are prompted for
RSA key…
Nicolas de Fontenay
- 4,209
- 8
- 21
- 18
115
votes
6 answers
How to copy and paste with a mouse with tmux
I'm using tmux and OSX. When copying and pasting from the terminal with tmux I'm able to hold down Option and select text. However I can't get the text to stay inside the pane. So when I want to copy text I either need to cycle the pane to the far…
mbigras
- 2,928
- 6
- 28
- 45
115
votes
12 answers
How to rename terminal tab title in gnome-terminal?
Used to be able to right click on the tab and change the title. Not sure how to do this anymore. Just upgraded to Fedora 21.
EDIT: I have switched from gnome-terminal to ROXterm
penner
- 1,261
- 2
- 10
- 8
115
votes
7 answers
Linux: set date through command line
How to change the system date in Linux ?
I want to change:
Only Year
Only Month
Only Date
Any combination of above three
SHW
- 14,454
- 14
- 63
- 101
115
votes
5 answers
How to add/update a file to an existing tar.gz archive?
Is there a way to add/update a file in a tar.gz archive? Basically, I have an archive which contains a file at /data/data/com.myapp.backup/./files/settings.txt and I'd like to pull that file from the archive (already done) and push it back into the…
Naftuli Kay
- 38,686
- 85
- 220
- 311
115
votes
2 answers
su options - running command as another user
I was wondering how to run a command as another user from a script.
I have the script's owner set as root. I also have the following command being run within the script to run the command as the hudson user:
su -c command hudson
Is this the correct…
myusuf3
- 1,385
- 3
- 9
- 9
114
votes
13 answers
What is the benefit of compiling your own linux kernel?
What benefit could I see by compiling a Linux kernel myself? Is there some efficiency you could create by customizing it to your hardware?
jjclarkson
- 2,147
- 2
- 17
- 16
114
votes
5 answers
Does the shebang determine the shell which runs the script?
This may be a silly question, but I ask it still. If I have declared a shebang
#!/bin/bash
in the beginning of my_shell_script.sh, so do I always have to invoke this script using bash
[my@comp]$bash my_shell_script.sh
or can I use…
jrara
- 2,069
- 8
- 23
- 20
114
votes
11 answers
How to solve the issue that a Terminal screen is messed up? (usually after a resizing)
Sometimes, a terminal screen is messed up, and when we use man ls to read the manpages, or press the UP arrow to go to previous commands in history, the screen will show characters not as the right place. (for example, treat the end of screen as…
nonopolarity
- 2,969
- 6
- 31
- 41