List the total number and size of files on the Linux command line
You can list the total files and file size of a directory with this command:
find /home/ubuntu/ -type f | wc -l && du -sh /home/ubuntu/
root@ubuntu:/home/ubuntu# find /home/ubuntu/ -type f | wc -l && du -sh /home/ubuntu/
186
318M /home/ubuntu/