I had a directory with number of files and need to check the count of files present in it.
I tried the following two commands:
ls | wc -l
ls -l | wc -l
and found there are differences while using both commands. (ie. number of files is greater in the usage of second command while comparing to the first command.)
I would like to know the changes happening in the both commands.
From
man ls
:So
ls -l
adds a header line stating the "total" size of files: