This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: What kind of executable is zcat? Crashes from cmd.exe
- From: "Ross Boulet" <ross at rossb dot com>
- To: "'Cygwin List'" <cygwin at cygwin dot com>
- Date: Thu, 12 Feb 2004 15:46:44 -0600
- Subject: RE: What kind of executable is zcat? Crashes from cmd.exe
>
> At 03:22 PM 2/12/2004, Bakken, Luke you wrote:
> >> Jamshid Afshar wrote:
> >> > I just installed Cygwin. What kind of executable is
> >> zcat.exe? It doesn't
> >> > show up when I "dir c:\cygwin\bin\zc*" (only zcmp), but I
> >> see it's 19
> >> > bytes in Explorer. It works fine within bash, but I want
> >> UNIX utilities I
> >> > can use in the regular Windows Command Prompt.
> >>
> >> $ ls -l zcat.exe
> >> lrwxrwxrwx 1 rcampbel Users 19 Jan 6 17:06
> >> zcat.exe -> gzip.exe
> >>
> >> As you can see from the ls output, it's a symbolic link
> >> (doesn't work in
> >> cmd). You can still call gunzip -c (or whatever).
> >
> >I had a similar problem when trying to use gunzip from a cmd prompt
> >outside of a cygwin shell - I was getting illegal ntvdm CPU
> errors. The
> >fix is to replace the softlink with a hard link:
> >
> >$ cd /bin
> >/bin
> >$ ls -l zcat*
> >lrwxrwxrwx 1 lukeb Users 19 Sep 21 16:29 zcat.exe ->
> >gzip.exe
> >/bin
> >$ rm zcat.exe
> >/bin
> >$ ln gzip.exe zcat.exe
> >/bin
> >$ ls -li zcat* gzip* gunzip*
> >1125899906888251 -rwxr-xr-x+ 3 lukeb Users 62976
> Jul 23 2003
> >gunzip.exe
> >1125899906888251 -rwxr-xr-x+ 3 lukeb Users 62976
> Jul 23 2003
> >gzip.exe
> >1125899906888251 -rwxr-xr-x+ 3 lukeb Users 62976
> Jul 23 2003
> >zcat.exe
> >
> >I would suggest doing the same with any other cygwin
> executable that is
> >a symbolic link that you intend to use "outside" cygwin.
>
>
> Sure, that's another option but one that eats up disk space if your
> partition isn't formatted for NTFS. Replacing "ln" with "ln
> -s" in your
> examples above will get you "Windows shortcuts" which you can
> use at the
> command prompt directly, so long as you don't mind typing
> ".lnk" at the
> end of each linked executable. This assumes you haven't added
> "nowinsymlinks" to your CYGWIN environment variable of course. This
> approach will save the disk space on non-NTFS partitions.
>
>
One other caveat I have found with using hard links (on an NTFS partition)
involves upgrades. I changed the symlink for ksh.exe -> pdksh.exe to a hard
link. When an new version of pdksh was installed, it resulted in two non
linked files. I had the new version as psksh.exe and the old version as
ksh.exe.
Ross
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/