[ Date Index ]
[ Thread Index ]
[ <= Previous by date /
thread ]
[ Next by date /
thread => ]
Re: [LUG] stupid data deletion...
- To: list@xxxxxxxxxxxxx
- Subject: Re: [LUG] stupid data deletion...
- From: Michael Mortimore <nospamformike@xxxxxxxxxxxxxx>
- Date: Thu, 26 Aug 2010 18:10:17 +0100
- Delivered-to: dclug@xxxxxxxxxxxxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=oytp4iGdZbHgtStnXi56seuQj+W4GWPJu/mNojj6pFI=; b=kWqb56RWjHF9iGUPJeRY10i94y4B1ii42xkZdynjBKEnTV91kT8ekORSPEkPcv72KQ VMvXZlt7/s8xtxKMpJmAE16CwzmRIZIHKSz/JtuaJPLjSFdDxCZGN8u/b+oOXwR/yDE/ DZV9Pl83qPjsmiK2OPncQ3hhVNXio4LsJas60=
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