Can anyone come up with a unix command that lists
all the files, directories and sub-directories in the current directory
except a folder called log.?
Thank you in advance.
hmm.. not working.. its displaying all the files in log folder. there are some millions of it.
pamu
5
find . | grep -v "^./log"
Hi elixir,
getting error for your command..
$ ls !(logs)
-bash: !: event not found
$ bash --version
GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)
1 Like
amazing. worked perfectly.
Turn on extglob ( shopt -s extglob
).
1 Like