I'm using SRM to securely delete files and directories. Most of the data is on FAT and NTFS volumes since I dualboot with Windows (I'm trying to use Ubuntu as much as possible and stay away from Windows).
However every now and then I run into an error Error: File <filepath> - file is hardlinked 1 time(s), skipping!
which I discovered means there's a hardlink to the file.
I did some searching and found the NON-srm way to delete all linked files is with the command (example:) $ sudo find ~ -xdev -samefile '/home/USERNAME/Desktop/hardlinks (copy).txt' | xargs rm
Unfortunately the above doesn't work if I replace "RM" with "SRM"...
Error: File /home/USERNAME/Desktop/hardlinks - No such file or directory
Error: File (copy).txt - No such file or directory
Error: File /home/USERNAME/Desktop/links.txt - file is hardlinked 1 time(s), skipping!
Is there a way to achieve the same result: search for hard links for a specific file, then process them through SRM? Preferably with the arguments -rvz (recursive, verbose, overwrite with zero)?
note: I also tried appending -print0
to FIND and/or -0
to XARGS which didn't help
0 Answers