edit this page - page history - about editing

Linux

Articles
  1. A Crude Latex Diff Script in Linux
  2. Installing PHP 5.2 on CentOS
ln -s <target> <source>     : create symbolic link
echo $?                     : print last return value int
tar -zcf out.tar.gz folder  : compress folder to .tar.gz
tar xzf out.tar.gz folder   : extract .tar.gz to folder
mogrify -format eps *.png   : convert all *.png to *.eps
sh -x <script>              : show all commands executed by given script for debug
If this fails, the version of tar may not support gzip compression. In this case, you can use the traditional two-stage command:
gzip -dc filename.tar.gz | tar xf -

Commit directories to SVN individually

find . -maxdepth 1 -regex \./[A-Za-z0-9].+ -exec svn commit '{}' --message "Adding {} pictures folder to repository" \;
Also see http://www.pixelbeat.org/cmdline.html for a neat reference.

Joining multiple PDFs together

If they're all the same size, you can use Ghostscript:
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf in3.pdf

Misc Notes

./configure: line 23: syntax error near unexpected token `$'in\r''

The configure file line endings has changed from Unix style to Windows style (probably winzip being stupid). To fix:
$ vim ./configure
:set ff=unix
:wq


Categories: Article | Linux

edit this page - what links to here? - page history - top
Last edited by jevon jevon 1 month ago