Is it possible to restore files/directories which are deleted from terminal using
rm -r?. If a file is deleted from graphical interface, it could be restored from trash, but how do you restore a file if it is removed from terminal?.
To this end I use
The files you remove will be moved to trash, and you can see them in nautilus trashcan.
You can always access the real
There are also commands to access the trashcan from terminal,
Last note, it is not advisable to use such an alias for super-user, because it can interfere with system operations.
Deleting it from terminal deletes it permanently - recovery is very hard and sometimes impossible.
If your partition type is
If it is not (if you installed Ubuntu with default settings), try the
There is no guarantee you will recover anything though.
Sorry, but files deleted from a command-line with the "rm" and "rm -f" bypass the "Trashcan" you have on the Gnome desktop.
You may also want to ask if there are any extfs "undelete" tools like there are for FAT and NTFS. (I don't know of any, but I'd be surprised if there were none.)