Check These Out
How to extract data from one table:
mysqldump --opt --where="true LIMIT 5000" dbinproduzione tabella > miodbditest_tabella.sql
Consider using this cmd when:
1. You are planning to traverse a big directory.
2. There is a subdir you don't want find to decend to. (entirely ignore)
3. You don't want find to decend to any mounted filesystems under this dir.
* The -xdev flag tells find do not go to other filesystems.
* -path ./junk_dir -prune is the pattern to ignore ./junk_dir entirely.
* The rest is the typical search and print.
To ignore multiple subdirs, you can just iterate the pattern, e.g.
find . -path ./junk1 -prune -o -path ./junk2 -prune ...
If you do want to include other filesystems, then remove -xdev flag.
If you want to search files, then change -type d to -type f.
This will extract all DCT format images from foo.pdf and save them in JPEG format (option -j) to bar-000.jpg, bar-001.jpg, bar-002.jpg, etc.
Inspired by http://stefaanlippens.net/extract-images-from-pdf-documents
This is based on __unixmonkey73469__ answer. You will need to supply `--multiline 1` option to JSON importer if your .json is multiline (i.e. it was prettyfied)
And you still need catmandu installed via `cpanm Catmandu`
Often you run a command, but afterwards you're not quite sure what it did.
By adding this prefix/suffix around [COMMAND], you can list any files that were modified.
.
Take a nanosecond timestamp: YYYY-MM-DD HH:MM:SS.NNNNNNNNN
$ date "+%F %T.%N"
.
Find any files that have been modified since that timestamp:
$ find . -newermt "$D"
.
This command currently only searches below the current directory.
If you want to look elsewhere change the find parameter, e.g.
$ find /var/log . -newermt "$D"
For FreeBSD
(relies on 'imagemagick')
Convert all .png files to .gif. This can also go the other way if you reverse the file extensions in the command, e.g.:
$ for file in *.gif; do convert "$file" "$(basename $file .gif).png"; done
If the file is named 'example1.png' it will be named 'example1.gif' when it is complete.
This works just as well for SMTP. You could run this on your mail server to watch e-mail senders and recipients:
tcpdump -l -s0 -w - tcp dst port 25 | strings | grep -i 'MAIL FROM\|RCPT TO'
Useful for backing up old files, custom logs, etc. via a cronjob.