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
#!/bin/bash | |
sudo tcpdump -A -i eth1 port 4222 -s0 | |
#-w dumps the output out to a file |
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
require 'fileutils' | |
require 'find' | |
def cp_symlink(f) | |
new_file = "#{f}.new" | |
old_file = File.readlink(f) | |
FileUtils.cp(old_file, new_file) | |
`rm -r #{f}` | |
File.rename(new_file, f) | |
puts "Processed #{f}" |