First of all, I would like to say thank you for paying attention to my thread. I tried
du command for the following lines
-rw------- 1 user1 user1 1317 Aug 3 17:17 anaconda-ks.cfg
drwxr-xr-x 3 user1 user1 4096 Aug 3 17:40 Desktop
-rw-r--r-- 1 user1 user1 28324 Aug 3 17:13 install.log
-rw-r--r-- 1 user1 user1 4151 Aug 3 17:12 install.log.syslog
And I got the results like the following
[root@linux ~]# du install.log.syslog
12 install.log.syslog
[root@linux ~]# du install.log
32 install.log
[root@linux ~]# du anaconda-ks.cfg
8 anaconda-ks.cfg
Now, total of 60 is clear.
I would like to know more about
total of ls -l. And I have tested the following...
[root@linux mydir]# touch one
[root@linux mydir]# touch two
[root@linux mydir]# touch three
[root@linux mydir]# ls -l
total 12
-rw-r--r-- 1 root root 0 Aug 8 11:43 one
-rw-r--r-- 1 root root 0 Aug 8 11:43 three
-rw-r--r-- 1 root root 0 Aug 8 11:43 two
[root@linux mydir]# du one
4 one
[root@linux mydir]# du three
4 three
[root@linux mydir]# du two
4 two
[root@linux mydir]# cat >> one
one
ls
[root@linux mydir]# ls -l
total 16
-rw-r--r-- 1 root root 7 Aug 8 11:45 one
-rw-r--r-- 1 root root 0 Aug 8 11:43 three
-rw-r--r-- 1 root root 0 Aug 8 11:43 two
[root@linux mydir]# du one
8 one
1. Linux uses 4 blocks for empty files????
2. Linux uses 8 blocks for non-empty files???
Thank in advance,
Greeting