OT: what to do with a mysterious file (was: Re: Creating PDF
documents)
Brian K. White
brian at aljex.com
Thu Mar 10 15:50:17 PST 2005
----- Original Message -----
From: "Lerebours, Jose" <Jose.Lerebours at EagleGL.com>
To: "FilePro Mailing List" <filepro-list at lists.celestial.com>
Sent: Thursday, March 10, 2005 4:23 PM
Subject: RE: Creating PDF documents
JP Posted:
>EEEEE... make that
>
>
> ftp.digi.com/support/legacy/digi/utilities/digifax/released/2.8/faxjet.01z
>
>| Faxjet will convert a PCL file to a TIFF file, suitable for immediate
>| faxing, or for further conversion with programs from libtiff, e.g.,
>| tiff2pdf or tiff2ps.
I noticed above links to a zip file but what do I use to unzip it?
gunzip nor unzip can ... :0(
What do I need to decompress it?
-----------------
"What do I do with this mysterious file?" 101
Little need to guess. That is precisely what the "file" command is for. It
itself only makes reasonable guesses but it does so based on a wamba big
list of byte/string signatures nd examining the actual contents of the file
and utterly ignoring the name.
First retreive the file in such a way that you know it hasn't been scrambled
by internet despoiler...
# wget
ftp://ftp.digi.com/support/legacy/digi/utilities/digifax/released/2.8/faxjet.01z
...
16:50:44 (44.65 KB/s) - `faxjet.01z' saved [442210]
Then if the files name doesn't offer clues, or offers clues that don't pan
out...
# file faxjet.01z
faxjet.01z: gzip compressed data - deflate method , max compression
Whaddya know. The "z" in the above filename really does not imply any kind
of compression because it does not adhere to any naming convention, rather
it looks more like a version number. But as it turns out it does happen to
be gzipped after all. But gzip does not ignore the files name unless you
override it's automatic file renaming feature by giving more and more
explicit command line options than you probably did.
if you say "gunzip filename" , gzip only has rudimentary filename parsing
and only recognizes a few common conventions like .gz and .tgz. Since you
didn't give it a specific output file to write to, it tries to figure out a
sensible output filename that won't overwrite the input file, and in this
case it can't figure out what the output file should be and the last thing
in the world you want is for it to "be creative", and so it very correctly
gives up.
If however you know the data is gzip data, you can unzip it, you just have
to handle such details as the output filename yourself.
# gzcat faxjet.01z >faxjet
That command produced no errors, so now we have a file "faxjet".
A gzip file is just a container and may contain anything. We don't know what
"faxjet" is any more than we knew what "faxjet.01z" was, except that one
leyer of cmpression has been removed. Which doesn't even mean that it's now
uncompressed, since you can compress a file as many times as you want and we
only removed one level. Probably it is now uncompressed but as before, we
dont' have to guess...
# file faxjet
faxjet: tar archive
clear enough.
now, since there is a reasonable chance that this tar file contains within
it a file named "faxjet" and it might not be in a subdirectory, we should
rename the tar file currently named "faxjet" to something unlikely to
collide with any of it's contents before we try to untar. "faxjet.tar" is
the obvious choice. We can look first and be sure if we want too, and in
fact on sco, that is always what you should do because of the way sco's tar
defaults to using full absolute paths. A strange tar may contain files that
overwrite files anywhere on your filesystem and that could be BAAAD, so
always take a look with "tar tvf" before doing "tar xvf" , or extract with
"tar xvAf" which will extract everything into the current directory and
create subdirectories under the current directory. In that case, Using xvAf
is only safer than xvf if you are not currently sitting in / !
# tar tvf faxjet |less
aha... here you have to be somewhat experienced with the particulars of SCO
in order to recognize some clues and know what to do next... It would not be
reasonable to expect you to know what to do next purely by basic unix
competence, unless you count "looking for some kind of readme in the place
where you found the tar file, which should have all necessary installation
instructions", which I do, but it's also not uncommon for said instructions
not to exist in a reasonably guessable location like that, so you may
possibly still be excused at this point for not knowing what to do next.
In this case, the tar contains some file names and directory structures that
are recognizeable as one of the several forms of file that can be installed
with either "custom" or "pkgadd".
Specifically, the 2nd file in the tvf listing is:
rw-r--r-- 0/0 0 Jul 29 04:36 1993
./tmp/_lbl/prd=faxjet/typ=n386/rel=2.4.0/vol=01
And I recognize that from having looked at other "custom installable" VOL
files before.
This is one of those times where simply being curious and figuring something
out with no hard justifiable cause or specific goal at the time, turns out
to to help you later in a real-life way.
So, because of that recognition, I now know that the most likely way to
treat this file is in fact NOT to untar it even though it happens to be a
tar file, but instead to make sure it is in a sub directory all it's own,
and rename it to "VOL.000.000" (those are number zero's not letter oh's)
I was already doing all this in a dedicated directory so all I have to do is
rename...
# mv faxjet VOL.000.000
and run "custom"
# custom
within custom you choose
"Software" menu
"Install New..."
"<*> From (your servers local hostname here)"
"Media Device: Media Images" (down-arrow to select "Media Images" from a
list that appears as soon as you press down-arrow)
"Image Directory:___" type in the directory where the VOL file resides, in
my case /u/bkw/faxjet
and voila, custom reads the file and presents you with a list of items that
the file contains that you can install. In this case there is one item.
select it, hit "install" and there you are.
see attached
...and of course, Murphy must have his input...
Unfortunately for the purposes of giving a tutorial on how to recognize and
install a VOL file, this particular package generates errors during install.
It says it can't find the compressed versions of several files that it needs
to uncompress, but they did actually get uncompressed and installed, and,
looking at the scripts in /usr/bin like /usr/bin/faxjet, the script expects
the uncompressed files to live in a certain spot and they are all there so
all is well and just ignore the erroneous error.
Brian K. White -- brian at aljex.com -- http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO Prosper/FACTS AutoCAD #callahans Satriani
-------------- next part --------------
A non-text attachment was scrubbed...
Name: custom_install.gif
Type: image/gif
Size: 8211 bytes
Desc: not available
Url : http://lists.celestial.com/pipermail/filepro-list/attachments/20050310/ffd8c4af/custom_install-0001.gif
More information about the Filepro-list
mailing list