[Cialug] Unable to remove a directory in RedHat7

Tom Sellers tomsellers2001 at yahoo.com
Fri Aug 22 15:13:50 CDT 2014


I ran it as you state below and the response is:

find: paths must precede expression

Ran it as root.
 

________________________________
 From: Ron Houk <houk.ron at gmail.com>
To: Central Iowa Linux Users Group <cialug at cialug.org> 
Sent: Friday, August 22, 2014 2:51 PM
Subject: Re: [Cialug] Unable to remove a directory in RedHat7
  

Tom,

To use the find command to try to strip off the directory cd into the
directory above it ( V6 )



and then run

find . -type d -mindepth 1 -maxdepth 1 -exec rm -rf {} \;


I think the way you ran it before with


find Portal -type d -mindepth 1 -maxdepth 1 -exec rm -rf {} \;

it was saying "look inside of directory 'Portal' and delete any
directories inside it."






On Thu, Aug 21, 2014 at 8:08 PM, Paul Gray <gray at cs.uni.edu> wrote:

> 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