tar command can be used to archive files. It was originally designed for storing data on tape archives (tar). It allows you to store multiple files and directories as a single file. It can retain all the file attributes, such as owner, permissions, and so on. The file created by the
tar command is often referred to as a tarball.
tar command comes by default with all UNIX like operating systems. It has a simple syntax and is a portable file format. Let's see how to do it.
tar has got a list of arguments:
v. Each of these letters can be used independently for different purposes corresponding to it.
To archive files with tar, use the following syntax:
$ tar -cf output.tar ...