move a file to Trash
Hi,
Can anyone please tell me the command to move a file to trash folder? Regards, M.Satheesh. |
If you want to do it from command and by moving to trash you want to delete the file, you can use rm command.
If you are in Gnome, you can right click on the file and click Move to trash option. |
Already I have checked with GNOME.I am able to perform this.I very curious to do the same thing through command.Hence already I have checked by using rm command.But its not moving to trash.
|
Those two ways will give completely different results: if from the CLI you did not previously install "libtrash" or equivalent, then running 'rm' will not put items in a "thrashcan" but delete them.
|
No other options through command?
|
None I'm aware of. Sure you could replace 'rm' binary with a script that implements a thrashcan (search LQ, more than enough threads trying things the "bad" way) but it'll be and remain an abomination in more than one way (performance, package management, compatibility, error handling).
|
All times are GMT -5. The time now is 06:44 PM. |