gavinj.net

Thoughts on technology, infrastructure, and AI

Python file magic

File magic is used on Linux and Unix systems as a binary "fingerprint" to tell what type a file actually is - this provides a much better result than MIME or filename extensions. The "magic" pattern i...

Mysql Command of the day

I thought this one was worth blogging. To save the output of an SQL query in a file simply do this: SELECT * FROM table INTO OUTFILE "/tmp/filename.txt" Produces a tab delimited file with the outputs...