snipt

Ctrl+h for KB shortcuts

Bash

Tar to a pipe, doesnt use diskspace

tar -cf - ./filename | (cd other-directory; tar -xf -)
https://snipt.net/embed/f400281d56a70cd05b1e5f06a2b9b346/
/raw/f400281d56a70cd05b1e5f06a2b9b346/
f400281d56a70cd05b1e5f06a2b9b346
bash
Bash
1
2019-08-22T02:49:30
True
False
False
/api/public/snipt/6899/
tar-to-a-pipe-doesnt-use-diskspace
<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>tar -cf - ./filename <span class="p">|</span> <span class="o">(</span><span class="nb">cd</span> other-directory<span class="p">;</span> tar -xf -<span class="o">)</span> </span></pre></div> </td></tr></table>
compress, shell, ssh, tar

Bash

Gzip-Tar a directory

tar -czvf archive.tgz files/
https://snipt.net/embed/3e7a2c87aa7882170e35a77e8206452e/
/raw/3e7a2c87aa7882170e35a77e8206452e/
3e7a2c87aa7882170e35a77e8206452e
bash
Bash
1
2019-08-20T06:10:00
True
False
False
/api/public/snipt/6898/
gzip-tar-a-directory
<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>tar -czvf archive.tgz files/ </span></pre></div> </td></tr></table>
compress, shell, tar