Join:
gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=newfile.pdf file1.pdf file2.pdf
Split:
gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dFirstPage=15 -dLastPage=30 -sOutputFile=newfile.pdf origfile.pdf
Compresssion:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf