Search code examples
linuxunixfilesize

How to check file size and file numbers using linux command?


I will have to take backup all the data in a server. After taking all the backup, I will try to check whether all the files get copied or not? But I am unable to check it. Is there any suitable command in linux to get the file size and file numbers?

I was trying with this, but not seems efficient one.

ls -1 | wc -l  #to know file numbers
du -sh #to know the size

Solution

  • Use rsync for the transfer. It also checks the files were transfered correctly.