UNDELETION EXT3 workaround

Vincent n1lqj at cox.net
Mon Feb 18 01:11:04 UTC 2008

The Linux EXT3 file system zero's the file pointers when you delete a
file.  The EXT2-Undeletion command does not exist with-in EXT3.  The
following is a more modern solution to the problem.

alias rm="mv --force --target-directory=$HOME/.Trash/"
alias rmdir="mv --force --target-directory=$HOME/.Trash/"

Removed files go into GNOME trash, and the icon even show papers in the
trash.  You can click on the trash icon anytime you want to delete or
un-delete a file or directory from the Trash.

I installed the following aliases in the aliases section of ~/.bashrc
for each user, except /root, where I specified


as root should never login into GNOME.

Now even if one has an accidental deletion of a file or entire directory
of files, one can simply copy the files back into place in the future,
from either the console or the trash icon on the task bar.

In a world with 500 GIG hard drives, these aliases should probably be
installed in all new ubuntu installations automatically, and advanced
users can remove them if they so desire.  The OS is not user friendly
with-out an undeletion or recovery method.


Vincent Chapman

More information about the Ubuntu-devel-discuss mailing list