snipt

Ctrl+h for KB shortcuts

Bash

Compress PDF files on Linux

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
https://snipt.net/embed/adde0ea97d0e8ded963cbe955246e2b6/
/raw/adde0ea97d0e8ded963cbe955246e2b6/
adde0ea97d0e8ded963cbe955246e2b6
bash
Bash
2
2019-06-24T12:54:27
True
False
False
/api/public/snipt/37407/
compress-pdf-files-on-linux
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>gs -sDEVICE<span class="o">=</span>pdfwrite -dCompatibilityLevel<span class="o">=</span>1.4 -dPDFSETTINGS<span class="o">=</span>/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile<span class="o">=</span>output.pdf input.pdf </span></pre></div> </td></tr></table>
compression, linux, pdf

Text only

code added to .htaccess to enable compression of certain served content using Apache mod_deflate

# compress all text & html
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/x-js text/css application/x-javascript application/javascript
https://snipt.net/embed/00eeb47352ae3f9782f4de7d88b1406c/
/raw/00eeb47352ae3f9782f4de7d88b1406c/
00eeb47352ae3f9782f4de7d88b1406c
text
Text only
2
2019-06-24T15:01:16
True
False
False
/api/public/snipt/14175/
code-added-to-htaccess-to-enable-compression-of-certain-served-content-using-apache-mod_deflate
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a># compress all text &amp; html </span><span id="L-2"><a name="L-2"></a>AddOutputFilterByType DEFLATE text/html text/plain text/xml text/x-js text/css application/x-javascript application/javascript </span></pre></div> </td></tr></table>
apache, compress, compression, htaccess, mod_deflate

Text only

Unix/Linux Compression

1
2
3
4
5
6
7
8
tar cf file.tar files – create a tar named file.tar containing files 
tar xf file.tar – extract the files from file.tar 
tar czf file.tar.gz files – create a tar with Gzip compression
tar xzf file.tar.gz – extract a tar using Gzip 
tar cjf file.tar.bz2 – create a tar with Bzip2 compression 
tar xjf file.tar.bz2 – extract a tar using Bzip2
gzip file – compresses file and renames it to file.gz 
gzip -d file.gz – decompresses file.gz back to file
https://snipt.net/embed/6e214bb8128b384ca30a4416c9a439bb/
/raw/6e214bb8128b384ca30a4416c9a439bb/
6e214bb8128b384ca30a4416c9a439bb
text
Text only
8
2019-06-20T01:25:59
True
False
False
/api/public/snipt/814/
unixlinux-compression
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>tar cf file.tar files – create a tar named file.tar containing files </span><span id="L-2"><a name="L-2"></a>tar xf file.tar – extract the files from file.tar </span><span id="L-3"><a name="L-3"></a>tar czf file.tar.gz files – create a tar with Gzip compression </span><span id="L-4"><a name="L-4"></a>tar xzf file.tar.gz – extract a tar using Gzip </span><span id="L-5"><a name="L-5"></a>tar cjf file.tar.bz2 – create a tar with Bzip2 compression </span><span id="L-6"><a name="L-6"></a>tar xjf file.tar.bz2 – extract a tar using Bzip2 </span><span id="L-7"><a name="L-7"></a>gzip file – compresses file and renames it to file.gz </span><span id="L-8"><a name="L-8"></a>gzip -d file.gz – decompresses file.gz back to file </span></pre></div> </td></tr></table>
compression, gzip, linux, tar, unix