Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to tar linux

tar -zcvf file.tar.gz /path/to/dir/
Comment

linux tar command

Create a new tar archive.
$ tar cvf archive_name.tar dirname/

Extract from an existing tar archive.
$ tar xvf archive_name.tar

View an existing tar archive.
$ tar tvf archive_name.tar
Comment

tar command

# Create (-c) and file (-f) file1 and file2 into "archive.tar"
tar -cf archive.tar file1 file2 
# Extract archived.tar into its content files into current directory
tar -xf archive.tar
# Extract archived.tar into its content files into given directory
tar -xf archive.tar -C given/directory
# List files in archive.tar
tar -tv archive.tar
Comment

tar command

tar -czvf name-of-archive.tar.gz /path/to/directory-or-file

#-c: Create an archive.
#-z: Compress the archive with gzip.
#-v: Display progress in the terminal while creating the archive, also known as “verbose” mode. The v is always optional in these commands, but it’s helpful.
#-f: Allows you to specify the filename of the archive.
#-x : Extract the archive 
#-t : displays or lists files in archived file 
#-u : archives and adds to an existing archive file 
#-A : Concatenates the archive files  
#-j : filter archive tar file using tbzip 
#-W : Verify a archive file 
#-r : update or add file or directory in already existed .tar file 
Comment

PREVIOUS NEXT
Code Example
Shell :: git update password 
Shell :: disable password ssh login 
Shell :: docker compose stop 
Shell :: array length bash 
Shell :: how to reverse a git pull 
Shell :: ip info on ubuntu 
Shell :: push code to github repository from command line 
Shell :: how to install scoop using powershell 
Shell :: how to mount a hard drive in ubuntu 
Shell :: ffmpeg not installed 
Shell :: install jupyter notebook 
Shell :: connect to a pod 
Shell :: install snap change in progress ubuntu 
Shell :: git pull from another branch 
Shell :: update aws amplify cli 
Shell :: unix check ram 
Shell :: see unpushed commits 
Shell :: grep nth line 
Shell :: add user to sudo 
Shell :: random hex chars bash 
Shell :: compress folder ubuntu 
Shell :: zip entire directory ubuntu 
Shell :: select ords version 
Shell :: install grafana 
Shell :: create virtual environment anaconda 
Shell :: ubuntu 18.04 default display manager 
Shell :: hopw to run the react-scripts command? 
Shell :: bitbucket change commit message 
Shell :: how to remove all space in file 
Shell :: ubuntu cmd time 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =