[Cialug] Unable to remove a directory in RedHat7

Paul Gray gray at cs.uni.edu
Thu Aug 21 20:08:31 CDT 2014


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."


More information about the Cialug mailing list