How to check for hidden file

Hi All,

Is there hidden files somewhere here since it's showing "total 16", but no files being revealed ?

$ ls -la
total 16
8 drwxrwxrwx 2 zzz yyy 4096 Apr 26 12:00 ./
8 drwxrwxrwx 9 zzz yyy 4096 Jul 31 16:59 ../
$

It shown that the hidden files occupied 16 Byte space.

the hidden files start with a . like
.raynon
.asdf
.dfhg

these are hidden files.If you want to see this you have to put
ls -al

it will show u all the files including the hidden files.
But the first two lines that is
./
../

they shows the link to current directory and the parent directory respectively.when we create a directory these two links are created automatically.

total 16 means the directory is taking 16 blocks of memory.

Thanks
Namish

Almost. :slight_smile: The 16 means that all of the entries add up to 16. There are two entries, one for the parent directory and one for the current directory. Each of these directories is using 8 blocks. If this directory was removed only 8 blocks would be recovered. The parent directory would continue to exist and continue to consume the other 8 blocks. You can see the 8 in the original directory listing posted above. Although the user seems to have entered the command "ls -la", we see the result that we would get with "ls -las". I guess an alias or a function is in use providing that s switch.

Hi Perderabo,

Can i find out where is the hidden file / or alias / or function is placed?

$ ls -las
total 16
8 drwxrwxrwx 2 zzz yyy 4096 Apr 26 12:00 ./
8 drwxrwxrwx 9 zzz yyy 4096 Jul 31 16:59 ../
$

The 16 blocks refers to the parent directory (..).

Many versions of ls have the -A option as well as -a; try that:

$ ls -las
total 1972
   4 drwxrwxr-x   2 chris chris    4096 Sep  5 22:09 .
1968 drwx------  11 chris wheel 2011136 Sep  5 22:09 ..
$ ls -lAs
total 0

So does it mean that "total 0" means no alias ?

$ ls -lAs
total 0
$

It means that there are 0 blocks occupied by the entries listed.

What do you mean by alias?

Ok i think i get it.
Thanks all for the help and advice.