Skip to content

Instantly share code, notes, and snippets.

@jonavon
Last active January 29, 2020 14:02
Show Gist options
  • Save jonavon/4b508f1779650c18d752148c518ef1bd to your computer and use it in GitHub Desktop.
Save jonavon/4b508f1779650c18d752148c518ef1bd to your computer and use it in GitHub Desktop.
# Tree replacement
find . | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-- \1/"
# Test Firewall with basic linux tools
#### Command for Destination Server; Create a listener on target port
nc -l 8080
#### Command for source server
echo > /dev/tcp/127.0.0.123/8085 && echo "Port is open"
#### Output should say "Port is open" and the `nc` command on destination server should be killed
# Date command for appending to backup files
date --utc +%Y%m$dT%H%M%SZ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment