[ILUG] listing files

Stephen_Reilly at dell.com Stephen_Reilly at dell.com
Mon Jul 16 10:26:53 IST 2001


ls | grep [0-9A-Za-z][^re]c$

Won't pick up files called c, but should suit your purposes. Aside from that
you could have a go at using find, it can be made search for some very
unusual things . . .

steve

-----Original Message-----
From: Ian_Hanney at canadalife.ie [mailto:Ian_Hanney at canadalife.ie]
Sent: 16 July 2001 09:53
To: ilug at linux.ie
Subject: [ILUG] listing files


Hi,

I have a list of files in a directory ending in 'c' such as

     foo1.rec
     foo1c
     f002.rec
     f002c
     ..
     ..

How can I list the files that end in 'c' excluding the '.rec' guys?  I've
been fiddling with ls for too long now!

Thanks,

Ian.


-- 
Irish Linux Users' Group: ilug at linux.ie
http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
List maintainer: listmaster at linux.ie




More information about the ILUG mailing list