Sample Header Ad - 728x90

How to list backup files missing corresponding real files?

2 votes
3 answers
855 views
I accidentally deleted some files spread across my home directory, but I do not know exactly which ones were removed. How can I get a list of all backup files missing their corresponding file? (equivalently, files having names ending with a tilde, without there being another file in the same directory with the same name sans trailing tilde?) I tried a few things so far; although I don't remember the exact flags, it was something like: grep -Rlv '(.*)\n\\1~|.*(?!~)' That didn't work, and neither did: ls -R | grep -v '(.*)\n\\1~|.*(?!~)' How can I find these files?
Asked by AJMansfield (924 rep)
Mar 11, 2014, 01:14 AM
Last activity: May 13, 2022, 03:01 PM