LinuxQuestions.org
Review your favorite Linux distribution.
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
  Search this Thread
Old 04-30-2009, 05:25 AM   #1
masatheesh
Member
 
Registered: Aug 2007
Distribution: CentOS 5.0,CentOS 5.5
Posts: 47

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, 05:41 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

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, 06:07 AM   #3
masatheesh
Member
 
Registered: Aug 2007
Distribution: CentOS 5.0,CentOS 5.5
Posts: 47

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, 06:10 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,361
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
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, 06:55 AM   #5
masatheesh
Member
 
Registered: Aug 2007
Distribution: CentOS 5.0,CentOS 5.5
Posts: 47

Original Poster
Rep: Reputation: 15
No other options through command?
 
Old 04-30-2009, 07:18 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,361
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:56 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration