[ale] delete all files but leave folder structure intact
Lightner, Jeff
jlightner at water.com
Mon Apr 18 16:28:44 EDT 2011
Also be sure NEVER to do "rm .*" in any directory. Many a newbie has
surprised themselves by trying to remove .profile, .bashrc .mozilla
etc... that way.
The ".*" will match ".." which is a hard link to the parent directory so
tells it to remove a directory above.
-----Original Message-----
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of
Michael B. Trausch
Sent: Monday, April 18, 2011 3:46 PM
To: Atlanta Linux Enthusiasts
Subject: Re: [ale] delete all files but leave folder structure intact
On 04/18/2011 03:22 PM, Ed Cashin wrote:
> To read into your question a bit, I'll assume you'd like to remove
> special files and symbolic links and named fifos as well as regular
> files.
>
> find xyz ! -type d -print0 | xargs -0 rm
Nice. I hadn't thought of that.
--- Mike
_______________________________________________
Ale mailing list
Ale at ale.org
http://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
Proud partner. Susan G. Komen for the Cure.
Please consider our environment before printing this e-mail or attachments.
----------------------------------
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.
----------------------------------
More information about the Ale
mailing list