A version of the Unix tar (tape archive) program is available from Itim Technology Solutions. tar saves and restores a collection of files into a single .tar file, which can then be transferred easily to another machine via the FTP utility. This is much more convenient that transferring many files individually.
The syntax of the tar utility is:
tar [key] [filename filename filename...]where key is one of:
-c Create a new archive file and add the named files to it
-x Extract the named files from the archive file. If no filenames are specified, every file is extracted
-t List the names of files in the archive
Additional arguments may be supplied:
-f filename Take filename as the name of the archive file.
-v Verbose. For -c or -x print each filename as it is processed. For -t provide a full directory listing
-w Print each filename to be processed and wait for user input; the action will be skipped unless it is confirmed by pressing the letter 'y' (yes)
-m Do not restore the file modification times; the modification time of each file is the time at which it is extracted from the tape or disk
-D Perform automatic conversion to, and from, MS-DOS format. This option can be specified multiple times. Specifying it a second time turns automatic conversion off for subsequent files, specifying it a third time tuens automatic conversion back on again, and so on.
-Z Perform automatic compression or uncompression: see below
-F <filename> Process the list of files named in <filename> . This argument may be repeated as often as required
Arguments to the tar utility can be combined in any reasonable way, for example:
tar -cvf file.tar -F listfileand
tar -c-v-f file.tar -F listfileare equivalent. Both of these command lines create a new archive file, containing the files listed in listfile. While the archive is being created, the names of files are displayed as they are processed. The archive file is a raw disk file and can be used to transfer files to Unix machines.
Some points worth noting are:
An argument of the form:
<targetname>=<sourcename>causes automatic renaming. With the -c option, the MS-DOS file 'sourcename' is stored in the archive under the name ' targetname . For example, the command: tar -cvf file.tar /opt/dp4/dbs/system.dat=c:\dp4\db\system.dat
could be used to prepare a disk on an MS-DOS machine for transfer to a Unix system. The command:
tar -xvf file.tar c:\dp4\db\system.dat=/opt/dp4/dbs/system.datcould be used to recover the file back onto an MS-DOS machine.
If the -D option is supplied:
If the -Z option is supplied:
In operation, tar may create temporary files with the names tar.tmp and tar.$$$ .
Be aware of the restrictions that the DP4 tar utility imposes when investigating its compatibilities with your Unix tarcommand:
The -D option will destroy any non-text file.