[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Recursive script help
- Subject: [ale] Recursive script help
- From: mdhirsch at mail.com (Michael D. Hirsch)
- Date: Fri, 3 May 2002 10:22:36 -0400
Gary MacKay writes:
> Is there a command that will delete all files, such as *.xyz or
> whatever, in the current directory and all subdirectories below it?
>
> I can make a script with a "for" loop to get the current and one layer
> down, but how do I keep going to _all_ subdirs of subdirs of...? Is
> there a single command or is a script required?
find is your friend. Something like this should work:
find . -name \*.xyz -exec rm \{\} \;
--Michael
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.