By your command

It’s been a while since my last update, but as with any good IT guy I’ve been both too busy and too lazy to write anything. Anyway, I thought I’d make a note of some commands more for my own use that anyone else’s, but if someone else does find one useful then that’s a bonus.

Split a file at a word or pattern into multiple files:

Notes: Replace FILE with the file name you wish to run the command against.

Take a screenshot via SSH:

Notes: None.

Search for something that looks like an e-mail address:

Run a query on multiple tables in a database matching a pattern

Notes: Replace the markers where indicated (USER, PASSWORD etc) and obviously change the example query.

Command line screencast

Notes: Run nc ADDRESS 5000 to connect and watch.

Empty all log files

Notes: None.

Watch MySQL queries

Notes: Replace the markers where indicated (USER, PASSWORD etc).

Find potential duplicate files

Notes: None.