home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / disk / backup / a055_1 / !Backup / TarDoc < prev    next >
Internet Message Format  |  1993-10-12  |  17KB

  1. Date: Wed, 8 May 91 10:43:18 +0200
  2. From: Frank Lancaster <fl@tools.uucp>
  3. In-Reply-To: Denis Howe's message of Mon, 6 May 91 14:23:58 BST
  4.  <22342.9105061323@asun4>
  5. Subject: Problems with tar
  6.  
  7. Hi!
  8.  
  9. I don't know why the latest tar package hasn't been
  10. posted to comp.binaries.acorn yet, but here's the
  11. latest documentation.
  12.  
  13. (Try putting
  14.  
  15. -C
  16. dirname
  17.  
  18. in the file name section of the tarlist file.  It might work,
  19. I haven't tried it yet.)
  20.  
  21. BFN, Frank Lancaster
  22.  
  23. ---------------------------------------------------------------
  24. tar - tape archive, version 1.1f, written for the Archimedes by
  25.  
  26.                     Frank Lancaster, 22-Apr-1991
  27.  
  28. Bug reports and comments may be sent as e-mail to: fl@tools.uucp
  29. Paper Mail: Frank Lancaster
  30.             Tools GmbH
  31.             Kessenicher Str. 108
  32.             W-5300 Bonn 1
  33.             Federal Republic of Germany
  34.  
  35.  
  36. This programme is public domain. You may copy it freely, provided
  37. you do not charge ANYTHING for its distribution.
  38.  
  39.  
  40. Table of Contents
  41. -----------------
  42.  1. Introduction
  43.  2. Installation
  44.  3. Usage
  45.  4. Normal Files As Archives
  46.  5. Hard Disc Backup
  47.  6. Compression
  48.  7. The List File
  49.  8. UNIX Compatibility
  50.  9. Raw disc dumping
  51. 10. History
  52.  
  53.  
  54.  
  55. 1. Introduction
  56. ---------------
  57. This version of tar is derived from the UNIX tar utility. Its main use
  58. is as a hard disk backup programme. It also comes in very handy when
  59. transferring files from or to UNIX. The name "tape archive" is misleading
  60. but historical. On the Archimedes archives are ordinary files on any
  61. file-system (adfs, scsi, dosfs, etc.). Multiple disc archives are
  62. supported, now also as ordinary files. Disk archives in ADFS D/E/L or
  63. MS-DOS (double-sided, 9 sectors) format dumped to raw disks are supported.
  64.  
  65.  
  66.  
  67. 2. Installation
  68. ---------------
  69. If you have clib version 3.66, you can use the tar_clib and compr_clib
  70. versions of tar and compress.
  71. Before using the programme set the system variable "tar$scrap" to the
  72. name of a temporary scrap file which should only be used by tar,
  73. for example "adfs::4.$.tmp.scrap". The leaf name must not be longer than
  74. 8 characters, another 2 ("-Z") are added if compression is used.
  75. This file will only be used if compression is enabled.
  76. If compression is used tar requires the compress programme (included in
  77. this distribution), which handles compression and decompression. Normally
  78. this should be accessable via the system variable Run$Path, but you can
  79. customize the compression and decompression commands with the two system
  80. variables tar$compress and tar$decompress (see below "compression").
  81. The system variable tar$filetype is used as file type for tar files. If
  82. it is not set, file type FFD (data) is used.
  83.  
  84.  
  85.  
  86. 3. Usage
  87. --------
  88. The programme should be called from the command line interpreter as it
  89. requires parameters.
  90.  
  91. tar [-]Commands[Options] ARCHIVE [LIST] [BLKS] [LEN] [-C DIR] file1 file2 ..
  92.  
  93. Commands:
  94.      c           create a new archive
  95.      r           append files to end of archive
  96.      t           list the contents of an archive
  97.      x           extract files from an archive
  98.  
  99. Options:
  100.      b BLKS      blocking factor BLKS (block size = BLKS x 512 bytes)
  101.      e LENGTH    maximum length of extension to use in UNIX file names
  102.      f ARCHIVE   read/write archive from file ARCHIVE (mandatory)
  103.      i           ignore checksum errors and blocks of zeros (normally EOF)
  104.      l [LIST]    read list of files from file LIST or !tarlist as default
  105.      m           don't extract file modified time
  106.      p           convert '!' in RISC OS names to '.' in UNIX names
  107.      s           swap extension in filename
  108.      v           verbosely list what files we process
  109.      w           ask for confirmation
  110.      z           run files through compress
  111.      B           reblock as we read
  112.      C DIR       change to directory DIR
  113.      E           '.' in UNIX names will be converted to '_'
  114.      F           format disk in drive 0 (multiple volumes & E-format only)
  115.      M           use multiple volume archiving
  116.      O           do not prompt for confimation when formating or
  117.                  overwriting disks
  118.      Q           quit immediately if error occurs, do not prompt for action
  119.      S           swap extensions in whole path
  120.      T           file types appended to names as with RISC-OS NFS
  121.      U           UNIX archive (no Archimedes extensions)
  122.      Z           convert UNIX '.Z' to '-Z' when extracting
  123.  
  124.  
  125. You must specify an archive file on the command line with the 'f' option.
  126. The path names of the archived files are stored as specified on the command
  127. line. Using the 'v' (verbose) option will list the path names stored as the
  128. archive is created. Normally you shouldn't specify the absolute path names,
  129. as you may want to extract the files to an other directory.
  130.  
  131.  
  132.  
  133. 4. Normal Files As Archives
  134. ---------------------------
  135. Here the use of tar is identical to the UNIX usage. The file name of an
  136. archive must always be supplied with the 'f' option. To create an archive
  137. use the 'c' option:
  138.  
  139. tar cvf myarc file1 file2 file3
  140.  
  141. This will create an archive 'myarc' in the current directory which contains
  142. the files 'file1', 'file2' and 'file3'. I always recommend using the 'v'
  143. option with every command, this gives more information on what is happening.
  144.  
  145. You can use path names with the archives and files specified:
  146.  
  147. tar cvf adfs::4.tmp.myarc adfs::5.file1 adfs::4.src.file2
  148.  
  149. To list the contents of an archive use the 't' command:
  150.  
  151. tar tvf myarc
  152.  
  153. To extract files from an archive use the 'x' command:
  154.  
  155. tar xvf myarc
  156.  
  157. This command will extract all files in the archive. If you only want certain
  158. files, you can specify them after the archive name:
  159.  
  160. tar xvf myarc file1 file2
  161.  
  162.  
  163.  
  164. 5. Hard disc backup
  165. -------------------
  166. This actually isn't very different from normal archiving. The main
  167. difference is that archive files are of course written to floppy discs and
  168. that they can be split across several discs. The command:
  169.  
  170. tar cvMf :0.backup :4.*
  171.  
  172. will backup all files on the hard disk :4 onto floppy disk :0 in the
  173. file 'backup'. If the archive requires more than one floppy disc, you will
  174. be prompted for more discs, which will contain further files also called
  175. 'backup'. They contain a header which supplies identification of the disc
  176. number so that 'tar' will be able to determine the disc sequence when
  177. extracting.
  178.  
  179. It would be better to go to the root directory of the hard disc and to use
  180. the following command:
  181.  
  182. tar cvMf :0.backup *
  183.  
  184. This will store the path names without the drive name, so you could extract
  185. them onto a different hard disk.
  186.  
  187. The command:
  188.  
  189. tar tvf :0.backup
  190.  
  191. will list the contents of an archive on floppy disc :0. If the archive was
  192. split across several discs, tar will prompt for further discs when finished
  193. listing one.
  194.  
  195. The command:
  196.  
  197. tar xvf :0.backup
  198.  
  199. will extract all files on floppy disc :0 in the file 'backup'. If the file,
  200. which is being extracted, already exists, tar will overwrite it without any
  201. warning.
  202.  
  203.  
  204.  
  205. 6. Compression
  206. --------------
  207. With the 'z' option files can be compressed before being written to an
  208. archive.  For compression the standard UNIX utility compress is used, also
  209. supplied with the tar programme. The system variable tar$scrap is used for
  210. temporary storage.  If you are backing up a complete hard disc and have
  211. enough memory you should use a RAM disc for the scrap file, and the compress
  212. programme should also be copied onto the RAM disc. You can use different
  213. programmes for compression and decompression if you set the tar$compress and
  214. tar$decompress system variables. The default settings are:
  215.  
  216.   tar$compress          compress < %1 > %2
  217.   tar$decompress        compress -d < %1 > %2
  218.  
  219. Most compression programmes add a suffix to the compressed file. The UNIX
  220. compress programme adds '-Z'. If a compression programme that you want to
  221. use, uses a different suffix, you can set the system variable
  222. 'tar$compress$extension'.
  223.  
  224. When writing a file 'TresImp' to an archive the compress command will expand
  225. to:
  226.  
  227.   compress < TresImp > Scrap-Z
  228.  
  229. The %1 parameter is substituted with the file name and %2 is substituted
  230. with the scrap file name.
  231.  
  232. The decompress command, when extracting the file, will expand to:
  233.  
  234.   compress -d < Scrap-Z > TresImp
  235.  
  236. So if you have a compression programme 'squash' and a decompression program
  237. 'expand', which take two parameters and don't use I/O redirection, set the
  238. variables to:
  239.  
  240.   tar$compress          squash %1 %2
  241.   tar$decompress        expand %1 %2
  242.  
  243. You can also specify absolute paths in these variables, e.g. when the
  244. compression programme is on the RAM disc:
  245.  
  246.   tar$compress          ram:$.compress < %1 > %2
  247.   tar$decompress        ram:$.compress -d < %1 > %2
  248.  
  249. Compressed files are automatically detected when extracting. A verbose
  250. listing of the archive also shows the compression percentage.
  251.  
  252. NOTE: The 'z' option is intended for hard disc backups, so that they can be
  253. compressed while being created. If you are created a normal archive file
  254. which will not be split, it is more efficient to compress the tar archive
  255. after it has been created. To do this, use the compress programme:
  256.  
  257. tar cvf myarc files...
  258. compress myarc
  259.  
  260. You will have to decompress the archive before extracting file form it.
  261.  
  262.  
  263.  
  264. 7. The List File
  265. ----------------
  266. The command:
  267.  
  268. tar l tarlist
  269.  
  270. will read file names and options from the file 'tarlist' instead of the
  271. command line, if any file names are given they will be ignored, options
  272. on the command line are overridden by options specified in the 'tarlist'
  273. file. The 'tarlist' file may contain empty lines, which are ignored, lines
  274. with one file name, and lines starting with a period followed by one
  275. command or option or a blank and a comment. For example:
  276.  
  277.  
  278. . tar archive definition file (this is a comment, note blank after the
  279.   period)
  280.  
  281. .c create command (stuff after .c is ignored)
  282. .v verbose option (stuff after .v is ignored)
  283. .f :0.backup (archive file name)
  284. .z compress option ( " )
  285. .b 400 blocking factor (stuff after 400 is ignored)
  286.  
  287. . file names follow
  288.  
  289. !Boot
  290. Apps.*
  291. Games.*
  292.  
  293.  
  294. This example file can be found in the distributed tar archive. If no list
  295. file name is given on the command line '!tarlist' will be used as default.
  296.  
  297.  
  298.  
  299. 8. UNIX Compatibility
  300. ---------------------
  301. Another main use of the tar programme is as a file transfer programme
  302. between UNIX and RISC OS. Archives created with the 'U' option can be
  303. processed by UNIX tar programmes. The UNIX file system doesn't know
  304. anything about file types, so these will be lost when using the 'U' option.
  305. File permissions and date stamps are converted to UNIX format (this is
  306. always done, even if the 'U' option is not used, but tar will save the
  307. original RISC OS date stamps also if 'U' is not used. UNIX tar programmes
  308. which ignore extra information in the tar header will be able to process
  309. non-UNIX archives).
  310.  
  311. The RISC OS version of tar detects UNIX tar archives and converts file
  312. names to adfs. The 's' option can be used to swap the extension of a file:
  313.  
  314. RISC OS ---> UNIX:  c.test ---> test.c
  315. UNIX ---> RISC OS:  test.c ---> c.test
  316.  
  317. When converting from RISC OS to UNIX, tar will only regard directories as
  318. a file name extension if the directory name is shorter than the maximum file
  319. name extension length. This is 3 by default, but can be set with the 'e'
  320. option.
  321.  
  322. The 'Z' option converts the UNIX '.Z' suffix to a '-Z' suffix as used by the
  323. compress programme ( test.c.Z -> c.test-Z ).
  324.  
  325. The 'p' option can be used when creating a UNIX archive to translate a '!'
  326. at the beginning of a file name to '.'.
  327.  
  328. NOTE: UNIX tar archives do not support multiple disc archives! They also do
  329. not support date stamps which are less than 1-Jan-1970.
  330.  
  331.  
  332.  
  333. 9. Raw disc dumping
  334. -------------------
  335. To transfer files directly via floppy disc to a UNIX machine, you will have
  336. to create a UNIX archive which is dumped on a raw disc, i.d. a disc that is
  337. formatted but which will not contain a directory structure. The most common
  338. disc format is the MS-DOS format (2 sides, 80 tracks, 9 sectors per track).
  339.  
  340. To create a raw disc archive use the special archive name 'floppy:'. Supply
  341. the drive number after the colon. For example:
  342.  
  343. tar cvf floppy:0 files...
  344.  
  345. will create a raw disc archive in drive 0 on a E/D-format disc.
  346.  
  347. tar cvf floppy:0M files...
  348.  
  349. will create a raw disc archive in MS-DOS format.
  350.  
  351. Disc should be formatted before dumping an archive on them.
  352.  
  353. On a UNIX machine a typical command to extract an archive from floppy disc
  354. could be:
  355.  
  356. tar xvf /dev/rfd0
  357.  
  358.  
  359.  
  360. 10. History
  361. -----------
  362. 1.1f
  363.   - 'Q' option added: non-interactive mode
  364.   - 'T' option added: file type handling like RISC-OS NFS
  365.  
  366. 1.1e
  367.   - "-C" can now also be used when extracting
  368.  
  369. 1.1d
  370.   - 'M' option re-introduced, must be used for multiple disc archiving
  371.   - raw disc dumping now should be chosen with 'f' option and 'floppy:'
  372.     archive name
  373.   - prompt for confirmation when using raw disc archives,
  374.     'O' option disables confirmation
  375.   - improved 'i' option, better defective archive handling
  376.   - when creating UNIX archives, directory to file extension swapping
  377.     will only occur if 's' option is used
  378.   - 'p' option introduced, enables '!' to '.' translation
  379.   - 'F' option introduced, formats floppy in drive 0 to E-format,
  380.     intended for hard-disc backup
  381.   - new system variable tar$compress$extension enables further configuring
  382.     of the compression programme used.
  383.  
  384. 1.1a
  385.   - first release to 'comp.sys.acorn'
  386.     Now I can feel what international means...
  387.     (A tip of the magical hat to all Rush fans)
  388.   - multiple disc archiving changed, now consistent with normal use;
  389.     archives on multiple floppy discs are now ordinary files and are split
  390.     into several files on different discs; main problem was writing a
  391.     filing-system independent free-space routine (not all filing systems are
  392.     FileCore based!)
  393.   - tar$filetype introduced; when set use value as FileType for tar files,
  394.     maybe Acorn could supply a tar file type; this would be mandatory for
  395.     a desktop version
  396.   - dangerous bug with tar$scrap set to directory removed; used to delete
  397.     directory recursively, now produces error message
  398.   - bug when extracting directories 'bad file name' removed
  399.   - tar$scrap now only has to be set when using compression
  400.  
  401. 1.0o
  402.   - RISC OS to UNIX file name conversion introduced
  403.     directory names may be converted to extensions,
  404.     '!' to '.', '/' to '_'
  405.   - new list file default '!tarlist'
  406.   - compress now called with I/O redirection, saves disk space and
  407.     I/O access time
  408.  
  409. 1.0n
  410.   - UNIX/RISC-OS time conversion rewritten: FP eliminated,
  411.     minor deviations corrected, over-/underflow check
  412.   - FSVars module no longer required
  413.  
  414. 1.0l-m
  415.   - system variable for compression scrap file tar$scrap
  416.   - system variables for compression and decompression commands
  417.     tar$compress, tar$decompress
  418.  
  419. 1.0h-i
  420.   - fixed more bugs with 's' option and introduced 'Z' option
  421.  
  422. 1.0g
  423.   - fixed bug with 's' option
  424.  
  425. 1.0f
  426.   - the 'r' option is now implemented
  427.   - the 'L' type discs are now implemented
  428.   - the 'M' option was dropped, multiple disk archives are now default
  429.     expect if writing a UNIX archive, or 'O' option is used
  430.   - new 'l' option introduced, files and options can now be specified
  431.     in a LIST file
  432.   - tar now prompts for 'discs' not 'volumes'
  433.  
  434. 1.0e
  435.   - first release into the public domain in 'eunet.micro.acorn'
  436. ---------------------------------------------------------------------
  437.  
  438. tar [1.1o] (7-Nov-91)
  439. ---------------------
  440.  
  441. tar: usage: tar [-]cmd[opt] ARCHIVE [LIST] [BLKS] [-C DIR] file1 file2 ...
  442. Commands: c          create a new archive
  443.           r          append files to end of archive
  444.           t          list the contents of an archive
  445.           x          extract files from an archive
  446. Options:  b BLKS     blocking factor BLKS (block size = BLKS x 512 bytes)
  447.           e LENGTH   maximum length of extension to use in UNIX file names
  448.           f ARCHIVE  read/write archive from file ARCHIVE (mandatory)
  449.           i          ignore checksum errors and zero blocks (normally EOF)
  450.           l [LIST]   read list of files from file LIST or !tarlist as
  451.                      default
  452.           m          do not extract file modified time
  453.           p          convert '!' in RISC OS names to '.' in UNIX names
  454.           s          swap extension in filename (see documentation)
  455.           v          verbosely list what files we process
  456.           w          ask for confirmation
  457.           z          run files through compress
  458.           B          re-block as we read
  459.           C DIR      change to directory DIR
  460.           E          '.' in UNIX names will be converted to '_'
  461.           F          format disc in drive 0 (multiple volumes & E-format
  462.                      only)
  463.           M          use multiple volume archiving
  464.           O          do not ask for confimation to format or write raw discs
  465.           Q          quit immediately if error occurs, do not prompt for
  466.                      action
  467.           S          swap extensions in whole path
  468.           T          file types appended to names as with RISC-OS NFS
  469.           U          UNIX archive mode (no Archimedes extensions)
  470.           Z          convert UNIX '.Z' to '-Z' when extracting
  471.  
  472. Please read the documentation file for further information. I will take no
  473. responsibility for damage or loss of data due to the use of this programme.
  474. tar [1.1o] (7-Nov-91) on the Archimedes by Frank Lancaster, Copyright (C)
  475. 1991.  This programme is public domain. You may not charge anything for it.
  476.