Skip to content

Instantly share code, notes, and snippets.

@vishnuhd
Last active August 18, 2021 02:18
Show Gist options
  • Save vishnuhd/a907694cd330d13f20878887343b5995 to your computer and use it in GitHub Desktop.
Save vishnuhd/a907694cd330d13f20878887343b5995 to your computer and use it in GitHub Desktop.
Helpful daily work commands for mac
  • Top 30 folders directories disk space sorted by size desc
du -h | sort -rh | head -30
  • Find a particular file or dir in current dir recursively
find . -name "darwin_amd64" -type d -print0
  • Find and delete a particular file or dir in current dir recursively (BEWARE!)
find . -name "darwin_amd64" -type d -print0 | xargs -0 rm -r --
  • Useful network utilities for DNS
dig A google.com
dig AAAA google.com
nslookup google.com
host google.com
  • Run maven on local without installing it
docker run -it --rm --name my-maven-project -v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven maven:3.3-jdk-8 mvn clean install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment