D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] stupid data deletion...

 

 On 08/25/10 17:55, Simon Waters wrote:
find /start/directory/here -type d -empty -print0 | xargs -0 rmdir

I haven't tested the later. Presumably if a directory contains only a
directory you would have to run it several times to remove mindless
chains of emptiness. There is probably a way to do that directly, but
life is too short.
I think rmdir -p will delete the directory and all parents that don't contain anything else.

--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq