If you would like to list the size of all the directories in your current folder run the following command: [bash]du -a -h –max-depth=1 | sort -hr[/bash] This will provide output similar to [bash] 69M . 36M ./plugins 16M ./.git 14M ./themes 3.4M ./uploads 8.0K ./.DS_Store 4.0K ./upgrade 4.0K ./.revision 4.0K ./index.php [/bash]
Remove untracked local files from Git
If you have need to get rid of a bunch of files that are in your git repo but not yet tracked it can be tedious to do the job one file at a time. Git has you covered with the git clean command. Warning: This is a permanent loss of files. Always use –dry-run
Cleanup and remove all merged local and remote git branches
After working on a project for a while you wind up with lots of feature and hotfix branches. If you are working on a team with a remote cannonical project repo there will likely be dozens or hundreds of stale branches that need pruning. Here are a few quick commands that will help you clean
Recursively count all files in a directory from the terminal
If you utilize the terminal on a regular daily basis like I do you are bound to run into times when you need to get a count of how many files exist in a directory structure. Here is some code that will display that count for you. find . -type f | wc -l The
How to get your Archlinux back on Digital Ocean
I love love love DigitalOcean! Spinning up and down boxes to play is fun and the price is awesome! I am even working on moving this site (and all the other sites I host) over to a DigitalOcean box managed by ServerPilot.io. DigitalOcean (DO) allows you to choose from a list of Linux distributions when