Skip to content

Instantly share code, notes, and snippets.

@tsvetomir
Last active October 4, 2016 15:26
Show Gist options
  • Save tsvetomir/be03bd76347642ff2f20 to your computer and use it in GitHub Desktop.
Save tsvetomir/be03bd76347642ff2f20 to your computer and use it in GitHub Desktop.
Command-line Fu
# Find broken symlinks
find /target/dir -type l ! -exec test -e {} \; -print
# Find and replace
find /some/path -type f -exec sed -i 's/old/new/g' {} \;
# Capture packets on a remote machine
# https://ask.wireshark.org/questions/36872/problem-capturing-remotely-by-running-tshark-on-the-remote-machine-and-piping-it-to-wireshark
ssh server1 'tcpdump -U -w - port not 22' | wireshark -k -i -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment