[plug] Identifying hard linked files [was: Identifying harded files]

Ryan ryan at is.as.geeky.as
Thu May 8 14:01:19 WST 2003


> > How does one _easily_ identify hard linked files?
> 
> find . -type f -printf '%n:%f\n' | grep -v '^1:'

> find <path> -links 1 -type f -ls
> Should run 'ls -dils' on any files in <path> or below that only have one
> link, any file with more than one link is hardlinked elswhere on the FS
> 
> You can probably to '! -links 1' to get just the linked files ?maybe?

Thanks for that.

Yes it does work (! -links 1), you don't need to put in the quotes either.

Still ugly aren't they, these hard link things ... think I'd best stay away from them :)

Ryan





More information about the plug mailing list