Last active
September 28, 2015 11:08
-
-
Save judy2k/cff9f37bec1050a582ba to your computer and use it in GitHub Desktop.
Bash tricks and tips
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
# 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 |
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 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