du and ls show different sizes for the same file


du and ls show different sizes for the same file

After uncompressing a file i was confused to see different sizes for the same file with du and ls command


When i used du it was showing the size




But ls output was showing a different size


So i realized these commands works in different ways

ls with option -l shows the allocated size but du shows the actual size (amount of space used).

If you want to see actual size with ls use -s option. If you use this way you can see both ls and du gives same output, in this case actual size is printer first






Comments

Popular posts from this blog

APP-FND-01436: List of Values cannot find any values for you to choose error from concurrent request program parameter (R12 12.1.3)

WEB ADI - issues encountered during initial access

Error processing request - Contact your application administrator apex 20.1