Hi, You can use `stat` to see that the inode numbers are identical. Hardlinked files also have a link count higher than 1.
$ echo hello >file1 $ ln file1 file2 $ stat file1 File: `file1' Size: 6 Blocks: 8 IO Block: 4096 regular file Device: 802h/2050d Inode: 134366889 Links: 2 Access: (0644/-rw-r--r--) Uid: (31002/ walter) Gid: (31013/ walter) Access: 2017-02-20 08:47:47.113865575 +0100 Modify: 2017-02-20 08:47:47.113865575 +0100 Change: 2017-02-20 08:47:52.210053451 +0100 Birth: - $ stat file2 File: `file2' Size: 6 Blocks: 8 IO Block: 4096 regular file Device: 802h/2050d Inode: 134366889 Links: 2 Access: (0644/-rw-r--r--) Uid: (31002/ walter) Gid: (31013/ walter) Access: 2017-02-20 08:47:47.113865575 +0100 Modify: 2017-02-20 08:47:47.113865575 +0100 Change: 2017-02-20 08:47:52.210053451 +0100 Birth: - Greets, --Walter On Sun, 19 Feb 2017 02:59:04 +0100, greg whynott <greg.whyn...@gmail.com> wrote:
Hello, Is there a method to exclude hardlinks from being transferred which exist within the data set to be transferred, yet are recreated on the other end? (using url-copy or any other tool) An example. In the below scenario only two files would actually cross the wire, file1.gz and subdir/file1.gz. file2.gz would be detected as a hardlink and excluded, file2.gz's hardlink would be recreated on the remote end. cp /opt/xfer/file1.gz /home/globus/xfer/file1.gz cp /opt/xfer/file1.gz /home/globus/xfer/subdir/file1.gz ln /home/globus/xfer/file1.gz /home/globus/xfer/file2.gz cheers, greg
-- Walter de Jong | Systems expert | SURFsara | Science Park 140 | 1098 XG Amsterdam | T 020 800 1300 | walter.dej...@surfsara.nl | www.surfsara.nl | | We are ISO 27001 certified and meet the high requirements for information security. |