compress PDF on console via ghostscript

You can compress PDFs pretty easily on comandline with ghostscript:
gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=output_file.pdf input_file.pdf