adding deleted file info to a single file [UNIX] -
so have simple problem
in order restore files, original directory , filename must stored.
create hidden file called ".restore.info". each line of file should contain name of stored file, followed colon, followed original full path , filename.
for example, if file f1 inode 1234 removed /home/usr1.name/ directory , file named f1 inode 5432 removed /home/usr1.name/testing directory .restore.info contain:
f1_1234:/home/usr1.name/f1
f1_5432:/home/usr1.name/testing/f1
any ideas?
ls f* | parallel 'echo {}_`stat -c%i {}`:$pwd/{} >> .restore.info ;mv {} recyclebin/{}_`stat -c%i {}`'
hope works +
Comments
Post a Comment