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

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

  




 

 

Next: , Previous: file, Up: Choosing


6.2 Selecting Archive Members

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:

     tar operation [option1 option2 ...] [file name-1 file name-2 ...]

If a file name begins with dash (‘-’), preceede it with --add-file option to preventit from being treated as an option.

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 Design by Interspire