public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Delete a specific type of files when they exist.
@ 2009-01-09  4:20 Hongyi Zhao
  2009-01-09  5:42 ` Yaakov (Cygwin/X)
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Hongyi Zhao @ 2009-01-09  4:20 UTC (permalink / raw)
  To: cygwin

Hi all,

I want to delete the all of the cache-2 files under a directory, so I
use the following line to do this:

if [ -f *.cache-2 ] rm *.cache-2

But it seems that this -f parameter in the _if_ command will not work
with wildcard, i.e., the  _[ -f *.cache-2 ]_ isn't a valid arg.  Any
hints on this issue? 

-- 
.: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-01-10 15:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-09  4:20 Delete a specific type of files when they exist Hongyi Zhao
2009-01-09  5:42 ` Yaakov (Cygwin/X)
2009-01-09  7:34   ` Hongyi Zhao
2009-01-09  9:31 ` Christopher Faylor
2009-01-09  9:41   ` Hongyi Zhao
2009-01-09 14:18 ` Eric Blake
2009-01-09 14:31   ` Hongyi Zhao
2009-01-09 15:18     ` Eric Blake
2009-01-10 11:59       ` Hongyi Zhao
2009-01-10 18:36         ` Eric Blake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).