Excluding files from ls

Open discussion on or around SGI; software/hardware related posts should go in the appropriate subforum.
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
Vader
Posts: 11
Joined: Fri Jun 06, 2003 5:22 am
Location: UK

Excluding files from ls

Unread postby Vader » Wed Jun 18, 2003 2:24 am

I'm sure this is really obvious but its one thing I've never managed to work out :?

How do you list all the files in a dir except for certain ones, such as .bck files ?

I'm using csh and one of my scripts produces a list of files in a certain dir, but that list now includes a lot of .bck files from NEdit. I'd like to keep the backups in the dir, but not include them in the listing thats displayed, but I'm stuffed if I can work out how :(

Any help greatly appreciated as always,
Best Regards,
Dave Fisher

User avatar
nekonoko
Site Admin
Site Admin
Posts: 8145
Joined: Thu Jan 23, 2003 1:31 am
Location: Pleasanton, California
Contact:

Re: Excluding files from ls

Unread postby nekonoko » Wed Jun 18, 2003 2:41 am

ls -l | grep -v .bck
Twitter: @neko_no_ko
IRIX Release 4.0.5 IP12 Version 06151813 System V
Copyright 1987-1992 Silicon Graphics, Inc.
All Rights Reserved.

Vader
Posts: 11
Joined: Fri Jun 06, 2003 5:22 am
Location: UK

Unread postby Vader » Wed Jun 18, 2003 3:05 am

Do'h! Thanks nekonoko! :lol:
Best Regards,

Dave Fisher


Return to “SGI: Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest