[NTLUG:Discuss] What's the bash equiv of the DOS for % in?

Richard Geoffrion richard at rain.lewisville.tx.us
Sat Aug 25 23:04:28 CDT 2001


DOS:  for %i in (*.*) do del ..\%i

English: For every instance of a file specified by the wildcard do command
using that file

I don't want to delete every file in that subdirectory...just the files that
I extracted.  So...if I sit in a directory that contains JUST the files that
came out of the tar and I issue the above DOS command...only I need the
LINUX version of it... I can automatically clean the files out of the
trashed up directory.

*note.  If you use that command in a DOS batch file, you need to use double
percent signs.


----- Original Message -----
From: "David Camm" <bbai at onramp.net>
To: <discuss at ntlug.org>
Sent: Saturday, August 25, 2001 10:43 PM
Subject: Re: [NTLUG:Discuss] What's the bash equiv of the DOS for % in?


> go to the directory you wnat to delete all the files form and do
>
> rm -fr *
>
> this will recursively delete everything in this directory and it's
> subdirectories (if any).





More information about the Discuss mailing list