"rm" command help
HI all
What is the procedure to recover the file/ atleast the contents when i delete a file using rm command? Is there any other temp. file deletion command....;like recovering from the recycling bin etc.? Thanks |
Depending on how your desktop is setup you may have a trash folder which is where you put files pending deletion. Otherwise you'll need to go to freshmeat and search for undelete, there are several tools to undelete files but I think most only work with ext2 or ext3 files. The last time I checked there were no undelete tools for reiserfs, so if your filesystem is reiserfs I think the files are gone.
|
If something's removed via the 'rm' command from a shell, then there's no easy way to remove it (i.e. it doesn't get sent to any Trash Can or anything like that). Thus, as /bin/bash said, you'll need to search somewhere for some undelete utilities, but it depends on your filesystem (it's a bit dodgy - you can't guarantee recovery).
If you deleted it via whatever DE / WM you used, they may have moved it to their own Trash Can, but that'll be pretty obvious (on your desktop or something). You can create a command similar to 'rm' with a "move to Trash Can" option very simply. For example, a quick and sloppy way to do it would be to create a shell script 'rmm' somewhere in your $PATH which would move it to ~/.Trash or something. |
I have a very simple function in my .bashrc file:
del() { mv -i $@ ~/Desktop/Trash } |
All times are GMT -5. The time now is 04:59 PM. |