LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   move a file to Trash (https://www.linuxquestions.org/questions/linux-newbie-8/move-a-file-to-trash-722658/)

masatheesh 04-30-2009 04:25 AM

move a file to Trash
 
Hi,

Can anyone please tell me the command to move a file to trash folder?

Regards,
M.Satheesh.

linuxlover.chaitanya 04-30-2009 04:41 AM

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.

masatheesh 04-30-2009 05:07 AM

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.

unSpawn 04-30-2009 05:10 AM

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.

masatheesh 04-30-2009 05:55 AM

No other options through command?

unSpawn 04-30-2009 06:18 AM

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.