Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to undo an rm command?

Status
Not open for further replies.

mlin

Programmer
Dec 25, 2003
4
MA
Is it possible to undo an rm command? how?
Mlin
 
Short answer is no. Sorry.

Long answer is "possibly", if as soon as you make the mistake you immediately unmount all FS and bring the machine down to single user. Then, in a few cases, there are tools which may help. I know nothing else on this subject though.

If it were me, I'd restore the deleted files from backup. You do have a backup ... don't you?

Greg.

 
There is a way to re-point the inode, what version of *nix?

--
| Mike Nixon
| Unix Admin
|
----------------------------
 
As a preventive measure, I know of some users who make an alias out of rm into an mv. So the garbage can into which files are moved can be emptied on a daily or weekly basis, according to your needs. Obviously don't even try if you're in a secure environment.
Best regards.
 
minor corrections to the "NO" from other guys.

if the FS used has journaling activated (assuming it supports it), and if that particular file/directory is journaled then it is possible to retrieve the last(s) versions of the file.

If the FS does not support the above (or if it is not active) then you may be able to restore it if you are lucky enough, but it is very unlikely.




Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top