Search This Blog

Friday, March 7, 2008

Is There a UNIX / Linux unerase / undelete Command?

Q. Is There a UNIX / Linux unerase or undelete command? How do I undelete files under a UNIX / Linux system? A.. Short answer - no.

There is no “unerase” or “undelete” command in Linux / *BSD / Unix like operating system such as AIX or HP-UX . The best solution is to restore file from a backup. You can also use a data recovery tool but there is no guaranty you will get back the data. Always use following method to avoid problems: => Make regular backups and file system snapshots

=> Never ever login as root for non admin related tasks

=> Always use a regular user account for all normal tasks

=> Alias rm / mv / cp command as rm -i / mv -i alias cp='cp -i' alias mv='mv -i' alias rm='rm -i'

=> Make important file copy before editing

=> Use RAID 6 or above hardware card as additional protection for file server

=> Keep files safe from accidental overwriting with noclobber under BASH shell

=> Make a Linux File unchangeable ( unalterable ) so that no one can modify it - including root user

1 comment:

kozmcrae said...

Actually, there is. I use PCLinuxOS which has KDE as the default desktop. In konqueror if I delete a file I just do cntl-z and it comes back. You can even close a session, start a new one and cntl-z will still work. I don't know the limitations of this feature but it sure is handy for those oops moments.