Last active
June 22, 2016 17:30
-
-
Save richy486/7b3c91e885a06fa3cbb8 to your computer and use it in GitHub Desktop.
Random bash commands
This file contains hidden or 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
| # copy source folder over the top of destination folder without deleting the destination | |
| ditto -v /path/to/source/folder /path/to/destination/folder | |
| # list all processes of application | |
| ps -ax | grep [application name] | |
| # kill all processes with tty | |
| killall -t [tty number] | |
| # kill processes with tty in range 1-50 | |
| for i in {1..50}; do kill $i; done | |
| # find all folders that dont have a file | |
| find ~/Projects -mindepth 1 -maxdepth 1 -type d '!' -exec test -e "{}/.git" ';' -print | |
| # batch resize images | |
| sips -Z 640 *.jpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment