linux - ls command ignore specific directory [bash] -


tree:

a.txt (file) tests/b.txt (directory) c.txt (file) 

ls :

a.txt tests/b.txt c.txt 

ignore specific file:

ls -i c.txt :

a.txt tests/b.txt 

ignore specific directory:

ls -i tests : (does not work - tests directory should not appear)

a.txt tests/b.txt c.txt 

the "man page" ls command explains -i flag accepts pattern. can use wildcard in command:

ls -i tests* 

see: man ls or commands online man page


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -