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

  




 

 

The --file Option

--file=archive-name
-f archive-name
Specify the name of an archive file.

You can specify an argument for the --file=archive-name (-f archive-name) option whenever you use tar; this option determines the name of the archive file that tar will work on.

If you don't specify this argument, then tar will examine the environment variable TAPE. If it is set, its value will be used as the archive name. Otherwise, tar will use the default archive, determined at the compile time. Usually it is standard output or some physical tape drive attached to your machine (you can verify what the default is by running tar --show-defaults, see defaults). If there is no tape drive attached, or the default is not meaningful, then tar will print an error message. The error message might look roughly like one of the following:

     tar: can't open /dev/rmt8 : No such device or address
     tar: can't open /dev/rsmt0 : I/O error

To avoid confusion, we recommend that you always specify an archive file name by using --file=archive-name (-f archive-name) when writing your tar commands. For more information on using the --file=archive-name (-f archive-name) option, see file.

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