#p #d #t #a #r #D #E #S #C #R #I #P #T #I #O #N #p #d #t #a #r is an extensive rewriting of gnu tar (public domain) that provides for direct transfer of tar format files between sco xenix and msdos systems




Дата канвертавання28.04.2016
Памер14.14 Kb.
_#p_#d_#t_#a_#r _#D_#E_#S_#C_#R_#I_#P_#T_#I_#O_#N _#p_#d_#t_#a_#r is an extensive rewriting of gnu tar (public domain) that provides for direct transfer of tar format files between SCO Xenix and MSDOS systems. _#p_#d_#t_#a_#r options are both a subset and a superset of those provided by Xenix tar. _#U_#S_#A_#G_#E _#p_#d_#t_#a_#r [-options] [file(s)] _#O_#P_#T_#I_#O_#N_#S _#p_#d_#t_#a_#r options are of three forms. -x the option x is invoked. -xNN the option x is invoked with an associated parameter set to the numerical value NN. -x string the option x is called with an associated string parameter set to string. NOTE _#p_#d_#t_#a_#r does NOT support tar style options where certain flags point to the nth argument. ----- April 23, 1989 ----- 2 _#F_#U_#N_#C_#T_#I_#O_#N_#S NOTE Use the -h option described below to verify your ver- sion of _#p_#d_#t_#a_#r against this documentation. If there is a difference, the -h will give the latest options. [0-9]Take options for a default file. On Xenix this is /etc/default/tar and under MSDOS /default/tar. NOTE You must create your own MSDOS default file in Xenix format to use this under MSDOS. -A Do NOT use absolute names if present (strip leading /). -c Create an archive. -C Change to a named directory. For example, given _#p_#d_#t_#a_#r -cvf archive.tar . -C ../goodies _#p_#d_#t_#a_#r will archive files in the current directory and its subdirectories (if any). It will then do a chdir to ../goodies and archive all files in it and its subdirectories. Files taken from ../goodies will have the form ./file rather than ../goodies/file. Copy under MSDOS files that were linked under **IX. -E Estimate the number of floppies needed. -f The following argument is the archive or device name. NOTE For MSDOS device names are given as a:, b:, c:, etc. _#p_#d_#t_#a_#r does NOT recognize or use the disk drivers supplied with MSDOS 3.x. For example, if you have a second drive with multiple drivers that you reference as e:, f:, etc. depending on density and tracks, for _#p_#d_#t_#a_#r, you must call the drive b:. NOTE NOTE NOTE _#p_#d_#t_#a_#r begins writing a track 0, if you specify your hard disk as the output device, it will probably TRASH YOUR HARD DISK. Testing whether this is really the case is left up to the user as an exercise. -F The following argument is the name of a file containing a list of files (or directories) to be placed in or extracted from an archive. ----- April 23, 1989 ----- 3 -G Extracts multiple generations. If a file in the archive has the same name but different modification time AND different size from the current file, the archive file is extracted under the name xxxxxxxx.ggg where xxxxxxxx is a (possibly) modified version of the current name and ggg is a unique number beginning at 000. -h Prints a summary listing of the available functions and options. NOTE This function is operating-system selective. -knn Specify the archive size (for fixed length devices) in kilobytes. Acceptable values for nn are 360, 720, 1200. NOTE _#p_#d_#t_#a_#r actually operates in terms of 512 character blocks, and it is this value that is used for reporting archive sizes. -m Do NOT restore modification times for extracted files. -n Not a tape or a pipe (seeks can be used to speed skips). This is implied by the -k option. -N If the local file is newer than the archive file, do NOT extract the archive file. -p Do not restore the original permissions but rather use the default permission generated by umask(). NOTE SCO Xenix documentation claims the -p option is necessary for restoration of the original permissions. This is backasswards from the way the program actually operates. -Pnn Strip the leading nn parts of the archive path name. -T Do NOT adjust MSDOS times. See below. -t Produce a table of contents. -x Extract from the archive. -U Do NOT mask MSDOS permissions to 0755. See "MSDOS PERMISSIONS" below. -Z Unlink each file as it is added to the archive. This option is potentially dangerous. ----- April 23, 1989 ----- 4 * Any other names on the command line are taken as files (or directories) to be placed in or extracted from an archive. During extraction named files or directories limits the extraction to matched items. NOTE A common error in this context is failure to give a properly literal string for a desired file name. For example, if an archive was made from a list (such as that produced by find) with names of the form ./path/name then a restrictive list must be of the form ./path or ./path/name Due allowance must be made for the impact of the -A and -P options in creating a restrictive list for an extraction. NOTE A single dash (-) given as a file name implies stdin or stdout as appropriate. NOTE The MSDOS version does NOT currently expand wildcards. If you are using the MKS Toolkit shell, names con- taining wildcards will be expanded but argument truncation is probable. NOTE Case IS ignored in MSDOS file specifications. NOTE Directory names given in a -F list ARE expanded. Be careful with the following construct: find . -print > filelist If the current directory has subdirectories, "filelist" will have those directory names plus the files in those directories. _#p_#d_#t_#a_#r will expand the directory names with the result that two or more copies of the files are added to the archive. The proper form for producing such a list (unless you want redundancy) is find . -type f -print > filelist ----- April 23, 1989 ----- 5 _#M_#S_#D_#O_#S _#T_#I_#M_#E_#S MSDOS and UNIX use different conventions for giving a time and date stamp to files. Although Turbo C and other MSDOS compilers provide functions that mimic **IX file functions, a problem remains because a given long integer value (the way tar records times) represents different "clock" times for MSDOS and **IX. _#p_#d_#t_#a_#r deals with the time problem by comparing the **IX representation of 1989:01:01 with the MSDOS version. The difference is used to adjust the file time stored in the tar header. In particular (a) an archive made under MSDOS has header times adjusted so that when the archive is extracted under **IX, the files will have the same clock times as they did under MSDOS. (b) an archive extracted under MSDOS has header times adjusted so that the extracted files will have the same clock time as they did under **IX. The **IX version of _#p_#d_#t_#a_#r does NOT change times. The time adjustment mechanism may be turned off with the -T option. Generally, even for archives used entirely under MSDOS, it should be left on. _#M_#S_#D_#O_#S _#P_#E_#R_#M_#I_#S_#S_#I_#O_#N_#S MSDOS has an even more brain-dead permission system than **IX. With archives created under **IX, _#p_#d_#t_#a_#r lets the chmod() function in Turbo C map the **IX permissions to those of MSDOS. With archives created under MSDOS, _#p_#d_#t_#a_#r gives all files permission 0755 unless the -U option is used. In this case the original MSDOS permissions are retained. With this option in effect, the usual MSDOS file is extracted with permission 0600 under **IX. _#M_#S_#D_#O_#S _#N_#A_#M_#E_#S ----- April 23, 1989 ----- 6 **IX names are modified, if necessary, to produce acceptable MSDOS names. The modification rules are: (1) Truncate file names to 8 characters. (2) Change any illegal characters in file names to 'z'. Translate any periods (other than for a suffix) to '_'. (3) Truncate suffixes to 3 characters. _#F_#O_#R_#M_#A_#T_#T_#I_#N_#G _#D_#I_#S_#K_#S _#p_#d_#t_#a_#r works with either Xenix or MSDOS format disks. Under Xenix, _#p_#d_#t_#a_#r (and Xenix tar) will write a proper tar format file to either Xenix or MSDOS format. This disk can be read under Xenix with tar or _#p_#d_#t_#a_#r and under MSDOS with _#p_#d_#t_#a_#r. Under MSDOS, _#p_#d_#t_#a_#r WITH THE RAW IO OPTION can use either Xenix or MSDOS format disks to write a proper tar format file that can be read with either tar or _#p_#d_#t_#a_#r under Xenix. Under MSDOS, _#p_#d_#t_#a_#r WITHOUT the raw io option writes standard MSDOS disk files. These can only be processed under MSDOS by _#p_#d_#t_#a_#r. Once a MSDOS format disk has been written with _#p_#d_#t_#a_#r rawio, it will NOT be acceptable for use as a standard MSDOS disk unless you reformat it. Note carefully the differences between the following cases. 1 _#p_#d_#t_#a_#r -cvf a:archive.tar -F filelist produces an archive on a MSDOS disk in MSDOS format. To read this under Xenix you need doscp -r a:archive.tar archive.tar tar -xvf archive.tar 2 _#p_#d_#t_#a_#r -cvf a: -k 360 -F filelist produces an archive in Xenix format (even if the raw disk has been formatted for MSDOS). To read this under Xenix you need only give tar -0xv ----- April 23, 1989 ----- 7 extract the contents. The converse of this operation also works for moving files to MSDOS from Xenix. _#P_#O_#R_#T_#A_#B_#I_#L_#I_#T_#Y _#p_#d_#t_#a_#r compiles and runs on the following systems: 4.3 BSD (Sun Workstations) SCO Xenix (80286 machines) MSDOS 3.x (AT-class machines) The code should be portable to any machine with a reasonable approximation of **IX stdio libraries. _#T_#A_#P_#E_#S _#p_#d_#t_#a_#r has not been tested with tapes. _#B_#L_#O_#C_#K_#I_#N_#G _#F_#A_#C_#T_#O_#R _#p_#d_#t_#a_#r uses a variable blocking scheme ranging from one (1) to twenty (20) 512 character blocks. _#E_#X_#T_#E_#N_#T_#S _#p_#d_#t_#a_#r follows the SCO Xenix scheme for splitting files too large to fit on a single floppy. _#L_#I_#N_#E _#T_#E_#R_#M_#I_#N_#A_#T_#I_#O_#N _#C_#O_#N_#V_#E_#N_#T_#I_#O_#N_#S _#p_#d_#t_#a_#r makes no attempt to adjust for the different line terminations of **IX (LF) and MSDOS (CRLF). The Kinmonth _#B_#i_#b_#l_#i_#o_#f_#i_#l_#e system includes a program for this purpose (_#u_#d_#l). This program can distinguish between text and binary files, converting only the former. Unless otherwise specified, con- verted files retain their preconversion modification times. Usage is simple: _#u_#d_#l -u -f list ----- April 23, 1989 ----- 8 converts all text files in list to UNIX conventions. Changing -u to -d converts all text files in list to MSDOS conventions. If the -N (extract only newer files) option of _#p_#d_#t_#a_#r is used, the following sequence results in the least processing. pdtar -Nxf archive > list pdtar -xf archive _#u_#d_#l -u -f list _#B_#U_#G_#S * Interrupt handling needs improvement. * No good provision is made for read/write errors, especially full disks under MSDOS. Due to bugs in MSDOS or the Turbo C library, a full disk produces a diagnostic about "file not found." * **IX -> MSDOS file conversion could be improved. * Wildcards in file names are not expanded when using command.com under MSDOS. _#C_#O_#P_#Y_#R_#I_#G_#H_#T SCO Xenix is a product of the Santa Cruz Operation. MSDOS is a trademark of Microsoft, a company dedicated to proving that you do not have to have a good product to make big bucks. Turbo C is a trademark of Borland International, a company dedicated to proving that you can lose money with good pro- ducts. The MKS Toolkit is a product of Mortice Kern Systems and worth every penny, US or Canadian! Portions of this program are dependent on code released to the Public Domain by John Gilmore. The author's release is cited below. ----- April 23, 1989 ----- 9 The remainder of the code is (c) 1988 by Earl H. Kinmonth, History Department, University of California, Davis, California, 95616. 916-752-1636/916-752-0776 ucbvax!ucdavis!ucdked!cck NON-COMMERCIAL, NON-MILITARY use permitted. [Original release in GNU tar code.] I am the author of all the code in this program. I hereby place it in the public domain. If you modify it, or port it to another system, please send me back a copy, so I can keep a master source. John Gilmore Nebula Consultants 1504 Golden Gate Ave. San Francisco, California, USA 94115 +1 415 931 4667 voice hoptoad!gnu data jgilmore@lll-crg.arpa data Hoptoad talks to sun, ptsfa, well, lll-crg, ihnp4, cbosgd, ucsfcgl, pyramid. ----- April 23, 1989 ----- #


База данных защищена авторским правом ©shkola.of.by 2016
звярнуцца да адміністрацыі

    Галоўная старонка