UNDO LINUX Trash Command
Is there any simple way to undo an
The question is purely theoretical; I have NEVER deleted the log of a benchmark queue who took a whole lunchtime to run.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
On ubuntu or similar:
$ sudo apt-get install trash-cli $ alias rm=trash
Then put that alias in .bashrc or the appropriate login script for your shell of choice.
trash-cli package is a command-line interface to the same trash can that GNOME and KDE and other use. So anything you delete via the
trash command can be restored by GNOME/KDE and vice-versa.
The other commands in the
trash-cli package are
The traditional answer is:
You recover the file from the latest backup. You do have a recent backup, don't you?
because on many unix filesystems this simple isn't possible, or is very difficult.
As others have noted this is not the end-all and be-all of the issue any more, but not making mistakes of this kind is still the preferred approach.