File Commands - 14paxton/Linux GitHub Wiki
title: File-Commands permalink: Linux/File-Commands category: Linux parent: Linux layout: default has_children: false share: true shortRepo:
- linux
- default
Table of contents
{: .text-delta } 1. TOC {:toc}- Say you want to compress an entire directory named
/home/vivek/data/ ,
then type:
tar -czvf file.tar.gz /home/vivek/data/To compress multiple directories and files, execute:
tar -czvf file.tar.gz /home/vivek/data/ /home/vivek/pics/ /home/vivek/.accounting.db- One can use
bzip2compression instead ofgzipby passing the-joption to thetarcommand:
tar -cjvf file.tar.bz2 /home/vivek/data/- c
- v
- f
- z
- j
tar xvf <.tar file>
tar xzvf <.tar.gz file>
tar xjvf <.tar.bz2 file>