leuchtraketen / fdupes

fdupes is a program for identifying duplicate files residing within specified directories
48 stars 8 forks source link

--linkhard deletes files across filesystem boundaries #5

Open danielhoherd opened 8 years ago

danielhoherd commented 8 years ago

When fdupes finds duplicates across filesystem boundaries while using the --linkhard option, it deletes the duplicate files and reports a errors creating hard links.

root@coral:/srv# grep srv /etc/mtab | column -t
srv    /srv    zfs  rw,noatime,xattr,noacl  0  0
srv/1  /srv/1  zfs  rw,noatime,xattr,noacl  0  0
srv/2  /srv/2  zfs  rw,noatime,xattr,noacl  0  0
root@coral:/srv# find /srv/ -type f
/srv/temp_file
/srv/1/temp_file
/srv/2/temp_file
root@coral:/srv# fdupes -r /srv
/srv/temp_file
/srv/1/temp_file
/srv/2/temp_file

root@coral:/srv# fdupes -rL /srv
   [+] /srv/temp_file
-- unable to create a hardlink for the file: Invalid cross-device link
   [!] /srv/1/temp_file -- unable to create a hardlink for the file: Invalid cross-device link
   [!] /srv/2/temp_file
root@coral:/srv# find /srv/ -type f
/srv/temp_file
root@coral:/srv#