0
I don't know why but I can't execute ls with ignore flag:
-bash-3.2$ ls -I '*.log'
ls: illegal option -- I
Do you know what else can I try?
0
I don't know why but I can't execute ls with ignore flag:
-bash-3.2$ ls -I '*.log'
ls: illegal option -- I
Do you know what else can I try?
1
-I
is a flag specific to GNU ls
that's not found in other versions of ls
.
Options include:
ls
command from it.ls | grep -v '\.log$'
ls *.[^g]
to list all files that don't end with the letter g.
2I see bash in the prompt. Can also use extglob:
shopt -s extglob
;ls !(*.log)
– Rich Homolka – 2014-05-30T20:41:36.120