Know your directory size
At times, when clearing up server space, we may need to find the large-sized directories. For that, you can use any of the following commands. The first command listed assumes that the file sizes are in MB. ,f it’s GB, of course, you haYe to replace M with G. This will help you to find out large sized directories.
du -sh * | grep M
To display the total size of all directories:
du -sch * | grep M
,f you suspect it is a file taking up a lot of space, you may need to change the command to:
du -ah * | grep M
faYourite sound now, while you log in to the system.
—Karthikeyan, innovatorforindia@gmail.com