Home » Linux cp -l command

Linux cp -l command

by Online Tutorials Library

Linux cp -l

If you want to create a hard link of a file instead of copying that file, you can use option ‘l’.

Note: In creating hard link of the file the inode number of the two files will remain same. While in case of copying, inode number changes.

Syntax:

Example:

Linux file cp -l

Note here that we have created a hard link of the file ‘file1.txt’ in ‘usr’. Inode number of both the files are same.

Next TopicLinux cp -p

You may also like