Skip to content

Instantly share code, notes, and snippets.

@richy486
Last active June 22, 2016 17:30
Show Gist options
  • Select an option

  • Save richy486/7b3c91e885a06fa3cbb8 to your computer and use it in GitHub Desktop.

Select an option

Save richy486/7b3c91e885a06fa3cbb8 to your computer and use it in GitHub Desktop.
Random bash commands
# 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