I use rsnapshot for backups, which generates a series of folders containing files of the same name. Some of the files are hard linked, while others are separate. For instance, hourly.1/file1
and hourly.2/file1
might be hard linked to the same file, while hourly.1/file2
and hourly.2/file2
are entirely separate files.
I want to find the amount of space used by the folder hourly.2
ignoring any files which are hard links to files in hourly.1
. So in the above example, I would want to get the size of file2, but ignore file1.
I'm using bash on linux, and I want to do this from the command line as simply as possible, so no big graphical or other-OS-only solutions please.