Linux DB PHP Scripts Tech Diary
Search This Blog
Wednesday, March 16, 2011
Using vim as a hex editor
Switch to hex mode
Open a file in vim, hit escape and type:
:%!xxd
to exit from hex mode
hit escape again and type:
:%!xxd -r
Search Hex using vim
\%xff or [\xff]
Search 44
\%x34\%x34 or [\x34][\x34]
Run MySQL SQL queries on Linux command line
This is a shell script
#!/bin/bash
deletelist="delete from capture_files where date(updated_on) < DATE_SUB(CURdate(), INTERVAL 30 DAY);"
mysql -u dbuser -pdbpasswd amp -e "$deletelist"
Newer Posts
Older Posts
Home
Subscribe to:
Comments (Atom)