Deleting folders with bad names

Status
Not open for further replies.

Christopher Joyson

Contributor
Joined
May 22, 2014
Messages
105
Hi

I am completely useless when it comes to FreeBSD and Unix type filesystms

I however have three folders I cannot get rid of through my windows explorer and in Shell they look like this:

drwxrwxrwx+ 5 media media 5 Sep 25 12:25 ./
drwxrwxr-x+ 16 media media 17 Sep 22 23:51 ../
drwxrwxrwx+ 2 media media 20 Mar 11 2015 Lloyd ft Andre 3000?Dedication To My Ex (Miss That) 2011 OFFICIA/
drwxrwxrwx+ 2 media media 20 Mar 11 2015 Sean Kingston ft Cher Lloyd?Rum And Raybans 2012 OFFICIAL 1080p/

I have tried rm -i -r */* this removed all the files in the directories but I still cannot remove the directories and if I try through windows then it appears there's unlimited files in there and I stop the deletion through windows.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Lloyd ft Andre 3000?Dedication To My Ex (Miss That) 2011 OFFICIA/
Sean Kingston ft Cher Lloyd?Rum And Raybans 2012 OFFICIAL 1080p/

An I correct you want to delete these two directories? You said there was 3 but only listed 2. If you use the shell option in the GUI you can navigate to the directory just above these two. Then you will want to run rmdir "Lloyd ft Andre 3000?Dedication To My Ex (Miss That) 2011 OFFICIA/" and rmdir "Sean Kingston ft Cher Lloyd?Rum And Raybans 2012 OFFICIAL 1080p/"

This will delete the directory if it's empty. If it's not empty remove the files inside and try again. If this doesn't work there is another more harsh way I can explain.
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
rmdir? it's a DOS command, no? On unix systems I use rm -r to delete directories.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
rmdir is a *nix command to delete empty directories. It's safer than the heavy handed rm -r and doesn't require flags. It's safer because it won't delete the directory if there are files under it, so it makes you double check if you didn't clean up everything in the directory.
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Ah ok, I prefer to not have to delete the files inside the directory before deleting it (because it's one less thing to do) but I'm very careful when I delete things (and I usually alias rm to rm -iv and rmr to rm -rf) :)
 
Status
Not open for further replies.
Top