[Cialug] Unable to remove a directory in RedHat7

Tom Pohl tom at tcpconsulting.com
Thu Aug 21 21:20:49 CDT 2014


Was that directory created via samba? Can you go over samba to try to delete it?

-Tom


> On Aug 21, 2014, at 8:53 PM, Tom Sellers <tomsellers2001 at yahoo.com> wrote:
> 
> Here is the command string that I entered.
> 
> find Portal -type d -mindepth 1 -maxdepth 1 -exec rm -rf {} \;
> 
> It ran without any errors but the Portal directory is still there.  I don't really understand the command line.  I substituted the directory name in place of /dir but nothing else.  Is that correct? I ran the command line while I as already at the directory that contains the directory Portal.
> 
> 
> ________________________________
> From: Paul Gray <gray at cs.uni.edu>
> To: cialug at cialug.org 
> Sent: Thursday, August 21, 2014 8:08 PM
> Subject: Re: [Cialug] Unable to remove a directory in RedHat7
> 
> 
>> On 08/21/2014 07:47 PM, Tom Pohl wrote:
>> Can you try to mv the folder to a higher level like /usr/local/samba/public/extended/
>> 
>> -Tom
> 
> rm -rf can get hung up on unusual filenames, but "find" isn't as finicky.
> 
> Just try:
> 
>   find /dir -type f -exec rm {} \;
> 
> Watch for error messages - they'll expose the culprit.  The above will
> leave all of the directories in place though.
> 
> If it goes through, you can also try clipping all directories one-deep:
> 
>   find /dir -type d -mindepth 1 -maxdepth 1 -exec rm -rf {} \;
> 
> 
> -- 
> Paul Gray                                         -o)
> 314 East Gym, Dept. of Computer Science           /\\
> University of Northern Iowa                      _\_V
> Message void if penguin violated ...  Don't mess with the penguin
> No one says, "Hey, I can't read that ASCII attachment ya sent me."
> 
> 
> 
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug


More information about the Cialug mailing list