ls to list files withouth my key word!
lets say I have 1k *.dcm files and 2 *.<other formats>....I want a command that will output the *.<other_formats>.
For example: $ls !(or something that does the not) *.dcm that gives me: *.x *.y *.z |
Code:
ls -I '*.dcm' |
Not working...
$ls -I '*.dcm' ls: ilegal option -- I usage: ls [-ABCD...] [file...] |
Quote:
|
A find alternative:
Code:
find . -maxdepth 1 -type f -not -name \*.dcm |
Code:
$\ls -I '*.dcm' Code:
type -t ls Code:
type ls |
I prefer using 'find but "modern" incarnations of 'ls' seem to have a "--hide=" switch so '\ls --hide=*.dcm;' could work.
|
Quote:
|
If you do have a really basic version of Linux, this should work
Code:
ls | grep -v '.dcm' |
All times are GMT -5. The time now is 07:49 AM. |