Batch resize images on Ubuntu
- Install imagemagick
- Create newdir and copy images to be resized into it
- cd into newdir
mogrify -format jpg -resize "800x500>" *
mogrify -format jpg -resize "800x500>" *
$ sed '/WORD1/,/WORD2/d' input.txt > output.txt
We were looking for a way to create mysqldumps which contained all the structures for the tables, but the data only for part of the tables.
nawk '/CREATE DATABASE \/\*\!32312 IF NOT EXISTS\*\/ \`%DB-NAME%\`/,$0 ~ /CREATE DATABASE/ && $0 !~ /%DB-NAME%/' DUMPFILE > DUMP_DB
Find first occurence of 'splitword' in file:
grep -n "splitword" bigdumpfile.sql | head -1 | cut -d : -f 1
Result is: 86948
Save partial dump:
cd into the directory you want to check
find -type l -exec ls -l {} \;
SELECT a.nid, b.nid FROM node AS a , node AS b WHERE a.nid = 13 AND b.nid !=14 AND b.nid !=15 ORDER BY RAND() LIMIT 3