Delete recursively:
find . -name "*.pyc" | xargs rm -f rm -rf `find . -type d -name .svn` find . -iname .DS_Store -print0 | xargs -0 -n 1 rm -f
Batch rename:
for file in *.txt ; do mv $file `echo $file | sed 's/\(.*\.\)txt/\1rst/'` ; done
Find largest files and folders:
sudo du -a /srv/www/ | sort -n -r | head -n 10 find /var -type f -ls | sort -k 7 -r -n | head -10
Delete files older than:
find . -ctime +30 -exec rm -rf {} \;
Using linked css and header level to H2:
rst2html.py --link-stylesheet --initial-header-level=2 src.rst > dst.html
Convert png to ico (favicons):
convert nb_logo.png -resize 16x16 nb_logo.ico
Get information (dimensions, size...):
identify image.jpg
Resize only width:
convert dipticnuvolic1.png -resize 700x diptic1.png
Force resize:
convert time_out_gran.jpeg -resize 320x214! time_out_mobile_portada.jpeg
Crop image:
convert ~/Desktop/timeout.png -crop 138x117+0+0 nuvolic/website/static/img/timeout.png
Get my public IP address:
curl http://whatismyip.org curl ifconfig.me
List of nameservers for TLD:
dig +short NS nomadblue.com
Backup gmail emails with label 'X' with getmail:
# First Place getmail.gmail in ~/.getmail/ cd /Users/nabuco/gmail-archive/ getmail -r /Users/nabuco/.getmail/getmail.gmail
FTP Upload a single file in one command line:
lftp -c "open ftp://salgotweb:[email protected]/; cd es/; put caca; quit;"
Mirror only HTML files in directory recursively:
mirror -I *.html .
Multiple put of HTMl files from local dir to remote dir:
mput es/*.html -d es/
Tell the fingerprint of an encryption key:
ssh-keygen -lf <keyfile>
Open files matching pattern in Vim:
vim `ack -l PATTERN`
Search only filenames matching pattern:
find . -name filename.txt | xargs ack PATTERN -