I am currently using Ubuntu 20.04.
When I check a file's size using the du
command, I get the following output:
ubuntu@ip-172-31-49-39:/myxfs$ du -h newquota
4.0K newquota
With the ls -la
command, I get the following:
ubuntu@ip-172-31-49-39:/myxfs$ ls -la
total 8
drwxr-xr-x 2 ubuntu ubuntu 22 Apr 18 19:17 .
drwxr-xr-x 22 root root 4096 Apr 17 12:05 ..
-rw-r--r-- 1 ubuntu ubuntu 1024 Apr 18 19:17 newquota
Why is there a difference in size for the same file? And what is the actual size of the file?