Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

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 :: unzip file to folder 
Shell :: postgres run query from command line 
Shell :: git submodule push current branch to master 
Shell :: Permission denied (publickey,keyboard-interactive). 
Shell :: how to ignore files in git 
Shell :: bash for i 
Shell :: github desktop arch linux 
Shell :: minishift admin-user addon 
Shell :: how to add opt/homebrew/bin to the PATH m1 macbook 
Shell :: how to put files into gitignore 
Shell :: laravel new project in install 
Shell :: raspberry clear cache 
Shell :: create pdf from images linux 
Shell :: find file linux 
Shell :: react loaders 
Shell :: Unsupported upgrade request. 
Shell :: git delete all local branches starting with 
Shell :: bash how to convert text to lowercase or uppercase 
Shell :: aws cli 
Shell :: wp cli plugin install 
Shell :: commit git 
Shell :: yarn global 
Shell :: how to terminate localhost 3000 linux 
Shell :: install tree in centos 7 
Shell :: how to install image app in linux using terminal 
Shell :: bash add all numbers 
Shell :: how to check the list of all applications in ubuntu 
Shell :: install astropy anaconda 
Shell :: how to navigate to a folder in cmd windows 10 
Shell :: bash for loop 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =