File Name arguments specify which files in the file system
tar operates on, when creating or adding to an archive, or which
archive members tar operates on, when reading or deleting from
an archive. See Operations.
To specify file names, you can include them as the last arguments on
the command line, as follows:
If a file name begins with dash (‘-’), preceede it with
--add-file option to preventit from being treated as an
If you specify a directory name as a file name argument, all the files
in that directory are operated on by tar.
If you do not specify files when tar is invoked with
--create (-c), tar operates on all the non-directory files in
the working directory. If you specify either --list (-t) or
--extract (--get, -x), tar operates on all the archive members in the
archive. If you specify any operation other than one of these three,
tar does nothing.
By default, tar takes file names from the command line. However,
there are other ways to specify file or member names, or to modify the
manner in which tar selects the files or members upon which to
operate. In general, these methods work both for
specifying the names of files and archive members.
Published under the terms of the GNU General Public License