4 ms·
A couple months ago I had to recover some rm'd files by basically grepping 512-byte blocks on the file system for the file headers then writing out the next few
by Jach 15y ago
A couple months ago I had to recover some rm'd files by basically grepping 512-byte blocks on the file system for the file headers then writing out the next few KB to a file on a separate partition to manually go through..
My command sequence was more like this though, rather than a straight rm:
find -name '*.java' | xargs grep --color 'something'
# guh, get rid of these old copied .svn dirs polluting output
find -name '.svn' | xargs rm -rf
# now what was that..
find -name '*.java' | xargs rm -rf
Forgot to edit the right side of the pipe back to the grep. Zealous use of the up-arrow burned me...