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.

Jul 172012
 

Create hard link in Linux

Answer:

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

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>