Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

15.1. tar (tape archiver)

Type tar then -option(s)

Options list:

  • c --- create.

  • v --- verbose, give more output, show what files are being worked with (extracted or added).

  • f --- file (create or extract from file) - should always be the last option otherwise the command will not work.

  • z --- put the file though gzip or use gunzip on the file first.

  • x --- extract the files from the tarball.

  • p --- preserves dates, permissions of the original files.

  • j --- send archive through bzip2.

  • --exclude=pattern --- this will stop certain files from being archived (using a standard wild card pattern) or a single file name.

tar examples

 

tar -cvpf name_of_file.tar files_to_be_backed_up

This would create a tape archive (no compressing).

tar -zxvpf my_tar_file.tar.gz

This would extract files (verbosely) from a gzipped tape archive.

 
 
  Published under the terms of the GNU General Public License Design by Interspire