Category: PHP, javascript

If you’re a DevOp or a just regular user who manages their Linux/Unix servers, it’s a recurring task where you would need to keep an eye on the size of the subdirectories and files of your project. It all takes a single command consisting of https://en.wikipedia.org/wiki/Du_(Unix) that lists all the important stuff that you would need. So, for instance, if I want to list the size of all the subdirectories and files for one of my projects called https://github.com/amitmerchant1990/notepad in ascending order of the size, here’s how I can do that.

https://www.amitmerchant.com/images/du-usage.png As you can tell, the command estimates file space usage of all the subdirectories and files which can be specified using the *.

Ultimately, we can then pipe the output of this command to sort which will sort the files and directories based on the memory they occupy.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners