Pages

Thursday, June 28, 2012

Why 'du', 'df', and 'ls' show different result for the same disk block

Share it Please

du , df and ls commands show different results for the same Disk block , the reason is

 * 'ls' gives data on individual files based on the difference between the end-of-file and the beginning-of-file, whether or not blocks were actually allocated to the file
 * 'du' shows the blocks actually allocated to an individual file
 * 'df' shows the blocks allocated in the entire file system, including inodes and other meta data