LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 04-30-2009, 04:25 AM   #1
masatheesh
Member
 
Registered: Aug 2007
Distribution: CentOS 5.0,CentOS 5.5
Posts: 43

Rep: Reputation: 15
move a file to Trash


Hi,

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

Regards,
M.Satheesh.
 
Old 04-30-2009, 04:41 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,560

Rep: Reputation: Disabled
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.
 
Old 04-30-2009, 05:07 AM   #3
masatheesh
Member
 
Registered: Aug 2007
Distribution: CentOS 5.0,CentOS 5.5
Posts: 43

Original Poster
Rep: Reputation: 15
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.
 
Old 04-30-2009, 05:10 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 21,599
Blog Entries: 47

Rep: Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413
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.
 
Old 04-30-2009, 05:55 AM   #5
masatheesh
Member
 
Registered: Aug 2007
Distribution: CentOS 5.0,CentOS 5.5
Posts: 43

Original Poster
Rep: Reputation: 15
No other options through command?
 
Old 04-30-2009, 06:18 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 21,599
Blog Entries: 47

Rep: Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413
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).
 
  


Reply

Tags
commands, linux


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
KDE4 'move to trash' doesn't vdemuth Slackware 4 04-21-2009 02:50 PM
how to uninstall folders/programs that do not have a move to trash option robert n. Linux - Software 2 08-13-2008 07:34 PM
Can't move files/folders to trash... adred Linux - General 1 06-22-2008 05:40 AM
Move to trash works beautifully, but empty trash .. different story. kd5eax Mandriva 2 12-04-2007 02:52 PM
making a script that will move a file or files in a trash folder Paxmaster Programming 5 12-12-2004 06:00 PM


All times are GMT -5. The time now is 02:51 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration