Although Tarballing sounds like a whole lot more fun than it actually is... it's a utility that stores one or more files in a single archieve. The format of the tar command is:
tar [options] [FileToCreate] [FileListToInclude]
Not included in the man page for tar... at least not on Debian.
Create a new file
Verbose... tell me what you are doing.
Feed the output into gzip
Create a file.
There are lots of other options...
tar -cvzf [tarball.file] File1.txt File2.txt File3.txt File4.txt
tar -cvzf [tarball.file] File*.txt
The first command line parameter is the function to perform. One of Acdrtux There should be only one of them... they don't play nice together.
Append the file to an existing archieve.
Create a new file.
Difference between two files.
Delete from archieve.
Append files to the end archieve.
List the contents of an archieve.
Test the vol label and exit.
Append newer files.
Extract the files from the archieve.
Options are different than functions. Where some functions can not be seen together, like c and x, options are not that way. May not make sense... but your mother won't be calling if you do.
There are a miriad of options when Tarballing, here are just a few of them... the important ones... I think.
add given file to the archieve. --add-file=myfile.txt
change to directory dir
Display a progress message every nth record. Default 10.
execute action on every checkpoint.
Exclude files that match pattern
The file to work on*
Force the name of group on added files.
Follow symlinks and dump the files they point to.
--newer, --after-date <date or file>
only stores files newer than date or file
Overwrite existing files when extracting.
force name as owner
Recurse into subdirectories (default)
Do NOT recurse into subdirectories
Remove files after adding to the archieve
Get file names to archieve from file
Verbosely list files processed.
attempt to verify the archieve after writing it
Exclude patterns listed in file
Use gzip to compress files
NOTE: the -f options needs to be the last in line because the next command line argument is the file name to work on.
Listing the Contents of a Tarball...
To list the contents of an archieve...
tar -ztvf [tarFileName]
The z is for a zip file, leave that out if it is not a zip file. The t lists the contents. The v is for verbose and f is the switch for the file which must be the last switch so the file name follows it.
Once you make an archieve... eventually... you have to unpack it. Use the same command to unpack it as you did to pack it... but... with the parameter. For eXtract.
tar -xvf [tarball/filename]
You can't use x and c together. It isn't fun and tar doesn't like it.