You've provided no Ubuntu product & release details; but if you perform a ls
command (ie list files) in a directory which has no contents (no files or directories; not counting any hidden files/directories), no results are shown as there is nothing to show.
eg.
guiverc@d7050-ubu-lts:~$ mkdir bl
guiverc@d7050-ubu-lts:~$ cd bl
guiverc@d7050-ubu-lts:~/bl$ ls
guiverc@d7050-ubu-lts:~/bl$ echo $PWD
/home/guiverc/bl
I created a directory bl
, then made in my present working directory ($PWD) with the cd
command, then performed the list-directory contents (ls
) in that empty directory, and it shows it was empty by the lack of results. This is expected.
To view all details in the directory; you can add options to the ls
command (which will not show hidden files/directories by default), which on the newly created directory will be
guiverc@d7050-ubu-lts:~/bl$ ls -lah
total 32K
drwxrwxr-x 2 guiverc guiverc 4.0K Aug 7 11:49 .
drwxrwxr-x 62 guiverc guiverc 28K Aug 7 11:49 ..
ps: I don't need all of -lah
, but my fingers typed when I wanted to add the -a
to show all, as I prefer reading results in long (-l
) format and in human format too (-h
) thus my fingers translated my mental -a
to -lah
My directory is actually empty (was only recently created), thus all mine contains is the pointers the system uses to 'walk the directory structure' which is what now show.