Programming‎ > ‎

bash and Co.

My main working environment is Linux (Ubuntu), with only few exceptions in Windows (to share EndNote documents with colleagues, for example). Here I summarize a small collection of common useful linux one-liners.
Showing 11 items
TaskCommandLinkRemarks
Sort 
 
Sort 
 
Sort 
 
Sort 
 
TaskCommandLinkRemarks
Tar skip svn directories/folders tar cvfz myproject.tar.gz --exclude=.svn myproject/ source  
Install windows fonts (arial, verdana, times new roman) in Ubuntu sudo apt-get install msttcorefonts http://sudo apt-get install msttcorefonts  
Convert a batch of files with ImageMagick mogrify -format png *.jpg source  
create patch from modified file patch -uN oldfile newfile > patch.txt source To patch use 'patch oldfile < patch.txt' 
Clean (remove) Ubuntu Memory Caches sudo echo 3 | sudo tee /proc/sys/vm/drop_caches source GNOME should be also restarted 
Convert PDF to print-quality PNG with ImageMagick convert -density 600x600 input.pdf -resize 1200x -density 600x600 output.png}  The -resize is calculated by dpi/2.54*cm (1 inch=2.54 cm) 
Edit PDF produced by R containing pch symbol 16 or 20 Use the 'Extension->Text->Replace' function of the Inkscape, copy a dot (U+25CF of Arial font) to replace the 'q'    
MD5 checksum of a directory find /path/to/dir/ -type f -name *.py -exec md5sum {} + | awk '{print $1}' | sort | md5su source  
Restore Ubuntu Gnome panel to default gconftool-2 --shutdown && rm -rf ~/.gconf/apps/panel && pkill gnome-panel http://ubuntuforums.org/showthread.php?t=392387  
Add ~ in Emacs where <dead-tilde> is undefined C-q 1 7 6 Enter http://www.opensubscriber.com/message/help-gnu-emacs@gnu.org/7172460.html  
Extract pages from PDF pdftk A=inputfile.pdf cat A22-36 output outfile_p22-p36.pdf http://www.linuxjournal.com/content/tech-tip-extract-pages-pdf Axx-xx specifies the pages to be extracted 
Showing 11 items
Comments