Indonesia Website Awards
Indonesia Website Awards

Hello everyone, I want to share information on how to check the size of data file / folder on linux. Usually a SysAdmin has a schedule to do a clean cleaning on the server he is holding, now to make it easier to clean the server, we must know the list of files / folders with the amount of data so that we can sort them when they want to be deleted. we can use this command to check it:

du [path] -sh

for example I want to list all the folders and files on my server, then I will run:

du /* -sh

for the /* sign means that I will check the path / on my server, here are the results:

 

du command

 

Also Read : Searching for Files Containing Certain Words on Linux

If we want to display only the Gigabyte scale we can add | grep G behind it like this:

du /* -sh | grep G

Then it looks like this:

 

du command

 

Yes, that’s what I usually do for how to check the size of the data file / folder on linux for me to clean it if it’s not in use. Hopefully this information is useful for readers, thank you all ^^.

Categories: Linux

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *