Skip to content

Instantly share code, notes, and snippets.

@judy2k
Last active September 28, 2015 11:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save judy2k/cff9f37bec1050a582ba to your computer and use it in GitHub Desktop.
Save judy2k/cff9f37bec1050a582ba to your computer and use it in GitHub Desktop.
Bash tricks and tips
# The following allows working with files with spaces in the names that come back from find:
find . -name 'names-with-spaces-maybe' -print0 | while read -d $'\0' file; do
do-stuff-with "$file"
done
# Find the process attached to a port:
netstat -tulpn
# Kill all subprocesses:
kill (jobs -p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment