home *** CD-ROM | disk | FTP | other *** search
- Program :
- LTAR
-
- Usage :
- LTAR [bxvt|f tarfile|g maptable|l dir-length|r rand-no-factor]
- one of b, x, t options must be supplied w/ f option.
- one of b, x option must be supplied w/ f and g options
- b := build map file of tarfile w/o extracting
- x := extract file in tarfile
- v := verbose mode
- t := full table list
- f tarfile := assign tape archive file (U*IX's *.tar)
- g maptable := the mapping table recorded converted-filename from *.tar
- l dir-length := reduce the length of extracted filename (see Examples.)
- r rand-no-factor := user-defined random seed for filename converting
- (see Examples.)
-
- Description :
-
- LTAR provides new consideration of detaring U*IX's *.tar into DOS
- file system, i.e., a well-considered policy (schema) is applied for this
- purpose. By creating a mapping table file (you can type this map file),
- we can inspect these files via another assistant utility TARV (See TARV.DOC
- tar viewer). The converting policy is simple, and just only a hashing function
- plus seeded-random number. To understand the detail information, please study
- the C source code of LTAR.
-
- Special compatibility is U*IX's file link, I just copy the linked
- filename as the content of link file. Another one is that DOS only support
- 62 characters for path, and I put `l option' to short U*IX's 256 characters
- filename.
-
- N.B. Any key-pressing will be recognized and will abort the
- operation of LTAR, i.e., if you want to stop immediately, just hit a key.
-
- Examples:
-
- (1):- LTAR tvf x.tar
- /* same as U*IX's tar tvf x.tar
- */
-
- (2):- LTAR xf x.tar g x.map
- /* same as U*IX's xf x.tar but ltar will print some dots `.' to tell
- you it is working as well as creating a map file x.map
- */
-
- (3):- LTAR xvf x.tar g x.map
- /* same as U*IX's xvf x.tar and create a map file x.map
- */
-
- (4):- LTAR xtf x.tar g x.map
- /* there is no equivalent U*IX command, due to this feature is a samll
- quirk (or bug)
- */
-
- (5):- LTAR bvf x.tar g x.map
- /* If you lost the x.map (deleted carelessly), you do not need detar
- x.tar again, just use b option to rebuild (or re-scan x.tar)
- mapping table.
- */
-
- (6):- LTAR xvf x.tar g x.map l 1
- /* Reduce converted filename's directories length, suppose there is a
- file in x.tar:
- This-is-a/very-long/path-with/several-levels-of-dirs/how-can/I-do-huh
- as you see, if you do not support `l option', it will be mapped into
- This-is-.XXX/very-lon.XXX/path-wit.XXX/several-.XXX/how-can.XXX/I-do-huh.XXX
- yes, it is too long! So, I provided `l option', and after applyoing
- `l 1' and this filename will be mapped as
- T.XXX/v.XXX/p.XXX/s.XXX/h.XXX/I.XXX/d.XXX/I-do-huh.XXX
- then it is accepted by DOS.
- (N.B. XXX is a 3 digits of hexidecimal number.)
- */
-
- (7):- LTAR xvf x.tar g x.map r 5
- /* let's suppose x.tar's content is:
- x.tar:
- drwxrwxrw- 0/0 0 Jan 27 08:48 1992 t/
- -r-xr-xr-- 0/0 2 Jan 27 08:48 1992 t/--------ABC
- -r-xr-xr-- 0/0 4 Jan 27 08:49 1992 t/--------BAC
- -r-xr-xr-- 0/0 4 Jan 27 08:49 1992 t/--------CBA
- and if we do not provide `r option' and `ltar xvf x.tar g x.map' :
- x.map:
- t/ t.074\
- t/--------ABC t.074\--------.0C6
- t/--------BAC t.074\--------.0C6
- t/--------CBA t.074\--------.0C6
- well, you can see that I just only summed up each character's ASCII
- code of filename. In hashing theory, this situation is called
- `collision', we must provide another factor to distingush amoung
- different files. After applying `r 5' option, i.e.,
- `ltar xvf x.tar g x.map r 5', now x.map is :
- x.map:
- t/ t.074\
- t/--------ABC t.074\--------.352
- t/--------BAC t.074\--------.358
- t/--------CBA t.074\--------.46D
- If you wish, you can modify the source code and let this schema
- perform as default hashing schema.
- */
-
- (8):- other similar examples:
- LTAR bvf x.tar g x.map r 5
- LTAR bf x.tar g x.map l 1
- LTAR btf x.tar g x.map l 1 r 5
- etc.
-