Ask a Question

in UNIX, How can you make out if two files are copies or links?

on 2012-02-04 03:08:18   by Priyanka   on MCA  2 answers

Sasanko

on 2012-02-04 10:30:00  

Use the long listing function of 'ls'. You will see a link count > 1 and a reference to where the file is linked to if it is a link. Without a link it is a copy.

Dipankar

on 2012-02-05 10:30:00  

We can have multiple names for a file called hard links; two files are separate files if their inode numbers are different. The -i option with the ls command will show the same inode number for links, different on copies of files. symbolic links are identified by the character l seen in the permissions field and the pointer notation in pathname, using the ls -l command.