LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-09-2014, 03:18 PM   #1
jyunker
Member
 
Registered: Aug 2009
Posts: 167

Rep: Reputation: 0
Sending a directory to trash


How does one move as whole directory (and subdirectories) to trash. I do not
want to use

rm -rf dir-name

since I believe that takes it out permanently. I just want to

send the directory to the trash and I may want parts of it back again in the future.

R,

jyunker
 
Old 04-09-2014, 03:25 PM   #2
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,969
Blog Entries: 1

Rep: Reputation: 208Reputation: 208Reputation: 208
Take a look at gvfs-trash and trash-cli commands

--C
 
Old 04-09-2014, 03:50 PM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,087
Blog Entries: 10

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
I don't recommend you keep stuff in either Trash or the Windows Recycle Bin with the intentions that you may want it back at some later point. However the easiest thing to do is to do it using the file manager, one like Nautilus. If you're command line, the cited commands are available.
 
Old 04-09-2014, 04:30 PM   #4
jyunker
Member
 
Registered: Aug 2009
Posts: 167

Original Poster
Rep: Reputation: 0
delete files and dirs but not permanently

Okay, I want to get rid of some files. They were dupes, I think, of some original files and directories.

Now I feel quite nervous about just deleting them. They are quite similar to the originals. Are they the originals?. I really do not know, it has been too long since they were created. I really feel uncomfortable about guessing.

If I can delete them temporarily and still use my system then they obviously were not the original files.

Then once they are gone, and the system runs well then there are no worries about permanently deleting them.

Permanently deleting these files without this test is too irreversible, too final.

If I can simply move them temporarily out of the way; then prove to myself that no system damage was done; and if it was
then move the files back to theiir original position.

Thus I want them in the trash, but able to be retrieved if needed.

I have known too many computer science employees who have carelessly and permanently deleted files only to realize later that they need them back,
But, they cannnot get them back!

That is why I want them in the trash and able to be moved back to their
original positions.

When I say files here, I also mean directories.

Thanks for your input.


R,


jyunker
 
Old 04-09-2014, 05:24 PM   #5
joe_2000
Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 808

Rep: Reputation: 216Reputation: 216Reputation: 216
for that usecase why not just rename the files / directories?
Like
Code:
mv directory directory.bck
For your test period this is the same as if they had been deleted. And you can be sure that no "smart" auto-empty function deletes them permanently before you want them deleted.
 
Old 04-10-2014, 07:44 AM   #6
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,087
Blog Entries: 10

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
joe 2000 has a good idea, consider that.

Or maybe don't even do this, the computer science persons who did that and screwed themselves; include myself many years ago. Eventually disk size exploded well enough that whatever files they are, if they are small an insignificant enough, then they're best left alone.

Because if they're truly going to interfere with your system booting, well then whether you rename or delete it ends up being a similar problem.

Big files like movies or very large log files are noticeable for what they are. Same thing for repository files; such as a simulation file or an email file.

Are you talking a sum total of Gigs, or Megs? Gigs, OK worth considering, even a couple of hundred Megs? I'd not bother; worth better to wait until you install a new system to find that files in a certain area are needed versus not.

Last edited by rtmistler; 04-10-2014 at 07:45 AM.
 
Old 04-11-2014, 10:19 AM   #7
jyunker
Member
 
Registered: Aug 2009
Posts: 167

Original Poster
Rep: Reputation: 0
Solved

I did rename the directories in question as instructed in the email by Joe. I will hold on to
these backup dirs as long as I need to do so.

This issue is now solved.

R,

jyunker
 
  


Reply


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
Lost disk space after deleting files, trash, hidden trash, etc. themacguy Ubuntu 7 06-06-2012 03:51 AM
How to open the trash folder and empty the trash in command line cmx08 Linux - Newbie 5 08-29-2008 10:15 AM
Move to trash works beautifully, but empty trash .. different story. kd5eax Mandriva 2 12-04-2007 03:52 PM
I changed the trash can icons but now the full trash can icon doesn't show? Why? Ausar Linux - Newbie 6 08-04-2004 02:59 PM
Trash Directory! InSane103 Linux - Software 2 07-10-2003 06:31 AM


All times are GMT -5. The time now is 11:57 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