Sintaksis: tar [options] [archive-file] [file or directory to be archived] Options: . -c : Creates Archive -x : Extract the archive -f : creates archive with given filename -t : displays or lists files in archived file -u : archives and adds to an existing archive file -v : Displays Verbose Information -A : Concatenates the archive files -z : zip, tells tar command that creates tar file using gzip -j : filter archive tar file using tbzip -W : Verify a archive file -r : update or add file or directory in already existed .tar file
Misollar: 1.-cvf opsiyasi yordamida siqilmagan tar arxivini yaratish: Bu buyruq joriy katalogdagi barcha .c fayllar arxivi bo'lgan file.tar nomli tar faylini yaratadi. $ tar cvf file.tar *.c Natija: os2.c os3.c os4.c
2.-z opsiyasi yordamida tar arxivida gzip siqish: Bu buyruq file.tar.gz nomli tar faylini yaratadi, bu .c fayllar arxivi hisoblanadi. $ tar cvzf file.tar.gz *.c 3.Gzip tar arxivini *.tar.gz -xvzf opsiyasidan foydalanib chiqarish: Bu buyruq tar arxivlangan file.tar.gz fayllaridan fayllarni chiqaradi. $ tar xvzf file.tar.gz 4.Linuxda -j opsiyasi yordamida siqilgan tar arxiv faylini yaratish: Bu buyruq gzip hajmidan kichikroq arxiv faylini siqadi va yaratadi. Siqish ham, ochish ham gzipdan ko'proq vaqt oladi.