I'm trying to find a command that would list all files (including hidden files), but must exclude the current directory and parent directory. Please help.
$ ls -a \.\..
Regarding the ls(1) documentation (man ls
):
-A, --almost-all do not list implied . and ..
you need (without any additional argument such as .*
):
ls -A
or better yet:
/bin/ls -A