Results 1 to 3 of 3
Hi,
I want to see the list of files and directories, but don't want to see the ones that end with a specific pattern. E.g. I have a big directory ...
- 09-10-2010 #1Just Joined!
- Join Date
- Sep 2010
- Posts
- 12
[SOLVED] ls filter negate
Hi,
I want to see the list of files and directories, but don't want to see the ones that end with a specific pattern. E.g. I have a big directory and some files are normal outputs and some are error outputs (ending in .err). If i want to see the error files I can simply say: ls *.err, but how can I negate that (show me anything but the ones ending in .err)
Thanks,
Mike
- 09-10-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Use the --hide=pattern option to the ls command. Example:
Code:ls --hide=*.err
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 09-10-2010 #3Just Joined!
- Join Date
- Sep 2010
- Posts
- 12
yes it worked. Thanks.


