LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-19-2004, 10:40 PM   #1
mfo6463
Member
 
Registered: Mar 2004
Posts: 88

Rep: Reputation: 15
Delete directory


How can I delete a directory using the terminal? When I try using rm or shred it says that I can't delete it because it is a directory.
 
Old 04-19-2004, 10:44 PM   #2
mfo6463
Member
 
Registered: Mar 2004
Posts: 88

Original Poster
Rep: Reputation: 15
Also, it says in rm that i should use shred to make it harder to find after it is deleted.... Where do the deleted files go after they are deleted??????
 
Old 04-19-2004, 11:14 PM   #3
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 47
rmdir directory

or

rm -rf directory

----------
man rm
man rmdir
 
Old 04-20-2004, 01:53 PM   #4
mfo6463
Member
 
Registered: Mar 2004
Posts: 88

Original Poster
Rep: Reputation: 15
Where do the deleted files go after they are deleted?
 
Old 04-20-2004, 02:05 PM   #5
comp12345
Member
 
Registered: Feb 2004
Posts: 467

Rep: Reputation: 30
They are deleted from the system. If you want to remove a file without actually deleting it, I suggest you use libtrash
 
Old 04-20-2004, 02:15 PM   #6
mfo6463
Member
 
Registered: Mar 2004
Posts: 88

Original Poster
Rep: Reputation: 15
The thing I don't understand is what I said before. When I type man rm in the terminal, it says that I should use shred to make the file harder to find after it is deleted. I assume that they mean that there is somewhere in the hard drive where the deleted files are..... am I wrong?
 
Old 04-20-2004, 02:28 PM   #7
ViNsAniTy
LQ Newbie
 
Registered: Apr 2004
Location: Ontario, Canada
Distribution: Slackware 9.1
Posts: 28

Rep: Reputation: 15
I think what it is referring to is the fact that when you delete a file it is not 'deleted' the way you typically think of deletion....the OS jsut makes sure nothing is pointing to that spot on the harddisk, and then sets that space as 'free' to be overwritten...

so when you delete a file, it actually is still on the harddisk, but is kinda just relabelled as free space until something else comes along and overwrites that sector...

Shred would write those blocks in the sector with random 1s and 0s so that data previously stored there (your deleted file) cannot be recovered...

That's how I understand it atleast...hope that helps!
 
Old 04-20-2004, 03:11 PM   #8
mfo6463
Member
 
Registered: Mar 2004
Posts: 88

Original Poster
Rep: Reputation: 15
ok, thanks. How would I delete a directory using shred? It says the same thing, that it is a directory...
 
Old 04-20-2004, 06:04 PM   #9
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 47
shred a file and then open it, you'll see all the gibberish it's shredded to. to find out specific shred options, man shred.
 
  


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
cant delete directory linuxmandrake Linux - Newbie 4 08-16-2005 12:14 PM
shell script: delete all directories named directory.# except directory.N brian0918 Programming 3 07-13-2005 07:54 PM
how can i delete an directory?? vito_huang Linux - Newbie 4 12-16-2004 03:15 AM
how to delete a directory master Linux - Newbie 2 03-27-2004 07:47 PM
How do you delete a directory? R4z0r Linux - Newbie 1 12-25-2002 12:16 PM


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