I want to remove the .. and . entry in the ls
output. How ever, running
ls . | sed '/^\.\./d;/^\.\//d'
doesn't work for me (./
is still here) and I can't figure out why.
ls
has -A
option exactly for this purpose:
ls -A
From man ls
:
-A, --almost-all
do not list implied . and ..