Projekt

Allgemein

Profil

Howto tar » Historie » Version 1

Jeremias Keihsler, 13.01.2017 09:55

1 1 Jeremias Keihsler
h1. tar
2
3
*tar* is installed by default
4
5
h2. basic tar usage
6
7
the most *nix-style way of getting help for @tar@ is @man tar@
8
9
for doing some basic storing/unpacking the following sequences should be enough.
10
11
to tar
12
<pre><code class="bash">
13
tar -cvzf tarfilename foldername
14
</code></pre>
15
16
to untar
17
<pre><code class="bash">
18
tar -xvzf tarfilename
19
</code></pre>
20
21
the example will tar the folder @abc@ to the archive @abc.tar.gz@:
22
<pre><code class="bash">
23
tar -cvzf abc.tar.gz abc
24
</code></pre>
25
26
for doing the same while preserving permissions
27
28
to tar
29
<pre><code class="bash">
30
tar -pcvzf tarfilename foldername
31
</code></pre>
32
33
to untar
34
<pre><code class="bash">
35
tar -pxvzf tarfilename
36
</code></pre>
37
38
the example will tar the folder @abc@ to the archive @abc.tar.gz@:
39
<pre><code class="bash">
40
tar -pcvzf abc.tar.gz abc
41
</code></pre>