Heute vor 20 Jahren

Vor 20 Jahren

Lade Artikel...

(Linux/Unix) ganzes Verzeichnis komprimieren

(Linux/Unix) ganzes Verzeichnis komprimieren

You need to use tar command as follows (syntax of tar command):
tar -zcvf archive-name.tar.gz directory-name

Where,

  • -z: Compress archive using gzip program
  • -c: Create archive
  • -v: Verbose i.e display progress while creating archive
  • -f: Archive File name

For example, you have directory called /home/jerry/prog and you would like to compress this directory then you can type tar command as follows:
$ tar -zcvf prog-1-jan-2005.tar.gz /home/jerry/prog

Above command will create an archive file called prog-1-jan-2005.tar.gz in current directory. If you wish to restore your archive then you need to use following command (it will extract all files in current directory):
$ tar -zxvf prog-1-jan-2005.tar.gz

Where,

  • -x: Extract files

If you wish to extract files in particular directory, for example in /tmp then you need to use following command:
$ tar -zxvf prog-1-jan-2005.tar.gz -C /tmp $ cd /tmp $ ls -





Kommentare und Reaktionen



Reaktionen

Lade Interaktionen...


Aufrufe des Artikels: Lädt...

Beliebteste Artikel

    Andere Artikel

    (C): All content, even lyrics and pictures, created by me: Jan Montag ∙ 2018 ∙ 2019 ∙ 2020 ∙ 2021 ∙ 2022 ∙ 2023 ∙ 2024 & 2025

    ~ Mondwärts Sonnentau - Writers make love to their demons ~

    done with ♥ in Mitteldeutschland

    An IndieWeb Webring 🕸💍
    < Zurück UberBlogr Webring Vor >

    thiswebsitekillsfascists button for websites

    Impressum