Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Nov 262012

What is the meaning of kill -0?


They are usually used to check if a given PID really exist or not (no side effect on Linux).


# kill -0 3182
-bash: kill: (3182) - No such process
# kill -0 3184
# nothing will be returned if process really exists.
Jul 172012

Create hard link in Linux


To create a hard link in Linux, use the ln command, e.g.

# echo "test" > test.txt
# ln test.txt hard_link.txt

To show they are pointing to the same thing, we can check the inode, e.g.

# ls -i
8232976 hard_link.txt  8232976 test.txt