LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 07-08-2003, 04:04 PM   #1
closet geek
Member
 
Registered: Apr 2003
Location: England
Posts: 146

Rep: Reputation: 15
Deleting a directory...


ripperx (rips cd tracks) created what seemed like a bulletproof directory for an album I ripped, I decided I didn't want the directory which contained the album so went to delete it, but got permissioin denied...

I logged in as root to BASH then tried to use the rm command to remove it but everytime I confirmed I wanted to delete it, it would appear to do it, but the directory was still there

So I thought maybe I could change the permissions using chmod but that didn't get me anywhere I still couldn't delete it from a normal user account.

I had to log out and log back in as root to get rid of it

Any ideas how I could've got ridden of it from a normal user account? Would right clicking it then changing the permissions from in there help, I don't see a delete option though, only able to make it writeable, executable & readable?!

cg

p.s. apologies I haven't got the permissions is came with written down, it was in the root user group though.
 
Old 07-08-2003, 04:22 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,950
Blog Entries: 11

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
What permissions/ownerships do the directories/files
get when ripperx writes them? Could you
post a
ls -l
of one of those?

Cheers,
Tink
 
Old 07-08-2003, 04:33 PM   #3
closet geek
Member
 
Registered: Apr 2003
Location: England
Posts: 146

Original Poster
Rep: Reputation: 15
here it is...

Quote:
total 4
-rw-r--r-- 1 root closetgeek 128 Jul 7 22:27 - track 1.mp3
cg
 
Old 07-08-2003, 04:39 PM   #4
andrewlkho
Member
 
Registered: Jul 2003
Location: London
Posts: 548

Rep: Reputation: 30
um...I know this sounds dumb, but did you use the correct syntax? Sometimes, if you just 'rm dir/', it'll do that, you have to 'rm -R dir/' to delete the directory itself. Sorry if I'm being patronising...
 
Old 07-08-2003, 05:10 PM   #5
closet geek
Member
 
Registered: Apr 2003
Location: England
Posts: 146

Original Poster
Rep: Reputation: 15
ho_10 it's cool!! I'm the kinda person who'd do that...

the exact command I used to try and delete the directory was:

rm -R /home/closetgeek/Desktop/test

it then asked me if I was sure, I hit enter, it presented me with another command line so I assumed it was done, yet, the damn directory is still there

cg
 
Old 07-08-2003, 07:53 PM   #6
andrewlkho
Member
 
Registered: Jul 2003
Location: London
Posts: 548

Rep: Reputation: 30
okay...two questions:
firstly, is this only one instance of this happening [ie have you ripped a cd and tried to delete the directory before?]
secondly, is the program you used to create the directory still running? you could try rebooting your computer - the directory may be 'busy'
hth
 
Old 07-08-2003, 08:53 PM   #7
gdrobson
Member
 
Registered: Jun 2002
Location: Ontario, Canada
Distribution: RH8.0
Posts: 65

Rep: Reputation: 15
I have had no problems logging in as root, and then typing :

rm -rf dirctory_to _delete .

the f option forces the delete, so you do not have to type 'y' to confirm it, and the r option makes it recursivly delete subdirectories as well.
 
Old 07-09-2003, 06:25 AM   #8
closet geek
Member
 
Registered: Apr 2003
Location: England
Posts: 146

Original Poster
Rep: Reputation: 15
It turns out the f was what was needed, for some reason if I type y to confirm the deletion it wouldn't do it but

rm -rf <directory> worked

thanks all!

cg

p.s. I just got samba working too! Next up giFT or KL through wine
 
  


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting a Directory using c++ in Linux ArulPrabhuT Programming 11 08-20-2011 11:10 AM
deleting directory w/o descending STAGED Linux - Newbie 5 08-24-2005 08:39 AM
"WARNING: Circular directory structure" error when deleting directory pistonbrew Linux - Software 5 02-03-2005 06:05 AM
deleting old /usr directory after a move... jimieee Linux - General 2 12-26-2003 05:15 PM
deleting non-empty directory sadiboyz Linux - Newbie 2 04-21-2003 09:29 PM


All times are GMT -5. The time now is 01:17 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 Google+: linuxquestions
Open Source Consulting | Domain Registration