First look at the output of ls --help command:
Several lines ignored in the output
-a, --all do not ignore entries starting with .
-l use a long listing format
- As you can see
-aand-allshould be same - I found
-lflag but there is no-alin the help but this flag works
So my questions are:
- Why don't
-aand-allreturn the same output but help shows both of them in a same line? - Is
-alan old form of-allbecause both are the same but I didn't find manual for-al - What's the meaning of
. ..in thels -aoutput?
Outputs of above commands included below:
ls -a :
. .. article.png bgame newtest
ls -all :
total 32
drwxr-xr-x 4 shahab shahab 4096 Sep 19 12:15 .
drwxrwxr-x 33 shahab sudo 4096 Oct 28 16:00 ..
-rw-r--r-- 1 shahab shahab 15504 Aug 19 16:06 article.png
drwxr-xr-x 5 shahab shahab 4096 Aug 19 10:41 bgame
drwxr-xr-x 5 shahab shahab 4096 Aug 29 16:48 newtest
ls -al :
total 32
drwxr-xr-x 4 shahab shahab 4096 Sep 19 12:15 .
drwxrwxr-x 33 shahab sudo 4096 Oct 28 16:00 ..
-rw-r--r-- 1 shahab shahab 15504 Aug 19 16:06 article.png
drwxr-xr-x 5 shahab shahab 4096 Aug 19 10:41 bgame
drwxr-xr-x 5 shahab shahab 4096 Aug 29 16:48 newtest