Calculate total space consumption for specific files in unix terminal

I have a folder containing .tcb and .tch files. I need to know that the size of all .tcb files, respectively, of all .tch files. I liked it:

1) I created a temporary folder, and then:

mv *tch temp

2) and then:

du -sk temp

I found a command on the Internet and wikipedia says this: "du (short for disk usage) is the standard Unix program used to evaluate file space usage." I think the reason is that he says that the rating is that if there are links, then the size of the link will be shown instead of the linked file.

But if I do

ls -l

in the temp folder (which contains all the * .tch files) and then summarize the sizes displayed in the terminal, I have a different file size. Why is this so?

, , * .tch , .

, - . !

+5
2

-L du, ( , ). -c .

, du -skLc *.tch.

du . .

+10

du, , .

"" , :

  • , , ", ".
  • Unix "", . .
  • , .

bytecount wc -c *.tcb

+1

All Articles