Last active
October 9, 2017 18:02
-
-
Save lucaswhitman/916d0da397ed39d9d69f208188123f61 to your computer and use it in GitHub Desktop.
Handy shell commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#find 20 largest files of certain extension recursively | |
find . -type f -name '*_test.js' -print0 | xargs -0 du | sort -n | tail -20 | cut -f2 | xargs -I{} du -sh {} | |
# find all git logs since date and export csv | |
git log --after='2017-04-01' --pretty=format:'%h;%an;%ad;%s' > ~/Desktop/logs.csv | |
# delete files older than x days: | |
find /path/to/directory/ -mindepth 1 -mtime +5 -delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment