Subject: Re: R: How to make cygwin redirect in UNIX mode?
From: Marco Atzeri <[email-masked]>
To: Pan ruochen <[email-masked]>
Cc: [email-masked]
Date: Mon, 8 Jun 2009 10:26:04 +0000 (GMT)
List-Id: <cygwin.cygwin.com>

as you can see:

Mount entries: these map POSIX directories to your NT drives.

-NT-           -POSIX-    -Type-  -Flags-
C:\cygwin      /          system  textmode
C:\cygwin/bin  /usr/bin   system  textmode
C:\cygwin/lib  /usr/lib   system  textmode
.              /cygdrive  system  textmode,cygdrive

you installed cygwin in text mode.
So the output is DOS style, to have UNIX output 
you need to install in binmode

Regards
Marco

--- Lun 8/6/09, Pan ruochen  ha scritto:

> Da: Pan ruochen 
> Oggetto: Re: R: How to make cygwin redirect in UNIX mode?
> A: "Marco Atzeri" 
> Data: Lunedì 8 giugno 2009, 12:05
> > 1)
> > To help on trouble shooting, please
> >
> > cygcheck -s -v -r -h > cygcheck_output.txt
> > and send us the result.
> >
> > See
> > http://cygwin.com/cygwin-ug-net/using-utils.html#cygcheck
> 
> Cygwin Configuration Diagnostics
> Current System Time: Mon Jun 08 18:02:38 2009
> 
> Windows XP Professional Ver 5.1 Build 2600 Service Pack 3
> 
> Path:    C:\cygwin\usr\local\bin
>     C:\cygwin\bin
>     C:\cygwin\bin
>     C:\cygwin\usr\X11R6\bin
>     c:\WINDOWS\system32
>     c:\WINDOWS
>     c:\WINDOWS\System32\Wbem
>     c:\Program Files\SecureCRT\
>     c:\Program Files\CodeLite
>     c:\Program Files\CodeLite\bin
>     c:\Program Files\TortoiseSVN\bin
>     d:\Tools\UltraEdit\
>     c:\splint-3.1.1\bin
>     d:\sbin
>     d:\Program Files\Vim\vim64
>     d:\sbin\svn-win32-1.6.1\bin
>     C:\cygwin\opt\3.4.0\bin
>     C:\cygwin\opt\sde-mips\bin
> 
> Output from C:\cygwin\bin\id.exe (nontsec)
> UID: 12685(reachpan)    GID: 10513(mkgroup-l-d)
> 0(root)             
>    544(Administrators) 
>    545(Users)
> 10513(mkgroup-l-d)
> 
> Output from C:\cygwin\bin\id.exe (ntsec)
> UID: 12685(reachpan)    GID: 10513(mkgroup-l-d)
> 0(root)             
>    544(Administrators) 
>    545(Users)
> 10513(mkgroup-l-d)
> 
> SysDir: C:\WINDOWS\system32
> WinDir: C:\WINDOWS
> 
> Here's some environment variables that may affect cygwin:
> USER = 'reachpan'
> PWD = '/cygdrive/d/SZ_SVN/latest/scripts'
> CYGWIN = 'binmode'
> HOME = '/cygdrive/c/Documents and Settings/reachpan'
> MAKE_MODE = 'unix'
> 
> Here's the rest of your environment variables:
> HOMEPATH = '\Documents and Settings\reachpan'
> MANPATH =
> '/usr/local/man:/usr/man:/usr/share/man:/usr/autotool/devel/man:'
> APPDATA = 'C:\Documents and Settings\reachpan\Application
> Data'
> HOSTNAME = 'reachpan-bj'
> TERM = 'cygwin'
> PROCESSOR_IDENTIFIER = 'x86 Family 15 Model 4 Stepping 9,
> GenuineIntel'
> WINDIR = 'C:\WINDOWS'
> VS80COMNTOOLS = 'D:\Tools\Microsoft Visual Studio
> 8\Common7\Tools\'
> TMPDIR = '/cygdrive/c/WINDOWS/TEMP'
> OLDPWD = '/cygdrive/d/SZ_SVN/latest'
> USERDOMAIN = 'ACTIONS'
> OS = 'Windows_NT'
> ALLUSERSPROFILE = 'C:\Documents and Settings\All Users'
> !:: = '::\'
> TEMP = '/cygdrive/c/DOCUME~1/reachpan/LOCALS~1/Temp'
> COMMONPROGRAMFILES = 'C:\Program Files\Common Files'
> USERNAME = 'reachpan'
> PROCESSOR_LEVEL = '15'
> FP_NO_HOST_CHECK = 'NO'
> SYSTEMDRIVE = 'C:'
> USERPROFILE = 'C:\Documents and Settings\reachpan'
> LANG = 'zh_CN.GBK'
> CLIENTNAME = 'Console'
> PS1 = '\[\033]0;\w\007
> \033[32m\]\u@\h \[\033[33m\w\033[0m\]
> $ '
> LOGONSERVER = '\\SRV-MICRO-DC'
> PROCESSOR_ARCHITECTURE = 'x86'
> !C: = 'C:\cygwin\bin'
> SHLVL = '1'
> USERDNSDOMAIN = 'ACTIONS.COM.CN'
> PATHEXT =
> '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
> HOMEDRIVE = 'C:'
> PROMPT = '$P$G'
> COMSPEC = 'C:\WINDOWS\system32\cmd.exe'
> TMP = '/cygdrive/c/DOCUME~1/reachpan/LOCALS~1/Temp'
> SYSTEMROOT = 'C:\WINDOWS'
> CVS_RSH = '/bin/ssh'
> PROCESSOR_REVISION = '0409'
> LC_CTYPE = 'zh_CN.gbk'
> INFOPATH =
> '/usr/local/info:/usr/info:/usr/share/info:/usr/autotool/devel/info:/usr/autotool/stable/info:'
> PROGRAMFILES = 'C:\Program Files'
> NUMBER_OF_PROCESSORS = '2'
> CHARSET = 'GBK'
> SESSIONNAME = 'Console'
> OUTPUT_CHARSET = 'GBK'
> COMPUTERNAME = 'REACHPAN-BJ'
> _ = '/usr/bin/cygcheck'
> 
> Scanning registry for keys with 'Cygnus' in them...
> HKEY_CURRENT_USER\Software\Cygnus Solutions
> HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
> HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts
> v2
> HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program
> Options
> HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
> HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
> HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts
> v2
>   (default) = '/cygdrive'
>   cygdrive flags = 0x00000020
> HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts
> v2\/
>   (default) = 'C:\cygwin'
>   flags = 0x00000008
> HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts
> v2\/usr/bin
>   (default) = 'C:\cygwin/bin'
>   flags = 0x00000008
> HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts
> v2\/usr/lib
>   (default) = 'C:\cygwin/lib'
>   flags = 0x00000008
> HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program
> Options
> 
> Listing available drives...
> Drv Type         
> Size   Used Flags       
>       Name
> c:  hd  NTFS 
>    20481Mb  81% CP CS UN PA FC 
>    system
> d:  hd  NTFS 
>    55764Mb  71% CP CS UN PA FC 
>    data
> e:  cd         
>    N/A    N/A
> 
> fd = floppy,          hd = hard
> drive,       cd = CD-ROM
> net= Network Share,   ram= RAM drive, 
>       unk= Unknown
> CP = Case Preserving, CS = Case
> Sensitive,   UN = Unicode
> PA = Persistent ACLS, FC = File Compression, VC = Volume
> Compression
> 
> Mount entries: these map POSIX directories to your NT
> drives.
> -NT-       
>    -POSIX-    -Type-  -Flags-
> C:\cygwin      /       
>   system  textmode
> C:\cygwin/bin  /usr/bin   system 
> textmode
> C:\cygwin/lib  /usr/lib   system 
> textmode
> .             
> /cygdrive  system  textmode,cygdrive
> 
> Looking to see where common programs can be found, if at
> all...
> Found: C:\cygwin\bin\awk.exe
> Found: C:\cygwin\bin\bash.exe
> Found: C:\cygwin\bin\cat.exe
> Found: C:\cygwin\bin\cp.exe
> Not Found: cpp (good!)
> Not Found: crontab
> Found: C:\cygwin\bin\find.exe
> Not Found: gcc
> Found: C:\cygwin\bin\gdb.exe
> Found: C:\cygwin\bin\grep.exe
> Found: C:\cygwin\bin\kill.exe
> Found: C:\cygwin\bin\ld.exe
> Found: C:\cygwin\bin\ls.exe
> Found: C:\cygwin\bin\make.exe
> Found: C:\cygwin\bin\mv.exe
> Not Found: patch
> Found: C:\cygwin\bin\perl.exe
> Found: C:\cygwin\bin\rm.exe
> Found: C:\cygwin\bin\sed.exe
> Not Found: ssh
> Found: C:\cygwin\bin\sh.exe
> Found: C:\cygwin\bin\tar.exe
> Found: C:\cygwin\bin\test.exe
> Not Found: vi
> Found: C:\cygwin\bin\vim.exe
> Found: d:\Program Files\Vim\vim64\vim.exe
> Warning: C:\cygwin\bin\vim.exe hides d:\Program
> Files\Vim\vim64\vim.exe
> 
> Looking for various Cygwin DLLs...  (-v gives version
> info)
>    61k 2009/03/02 C:\cygwin\bin\cygbz2-1.dll
> - os=4.0 img=1.0 sys=4.0
>                
>   "cygbz2-1.dll" v0.0 ts=2009/3/2 10:52
>     7k 2003/10/19 C:\cygwin\bin\cygcrypt-0.dll -
> os=4.0 img=1.0 sys=4.0
>                
>   "cygcrypt-0.dll" v0.0 ts=2003/10/19 15:57
>   943k 2007/12/17 C:\cygwin\bin\cygdb-4.5.dll - os=4.0
> img=1.0 sys=4.0
>                
>   "cygdb-4.5.dll" v0.0 ts=2007/12/17 21:12
>  1296k 2007/12/17 C:\cygwin\bin\cygdb_cxx-4.5.dll - os=4.0
> img=1.0 sys=4.0
>                
>   "cygdb_cxx-4.5.dll" v0.0 ts=2007/12/17 21:12
>   118k 2007/04/06 C:\cygwin\bin\cygexpat-0.dll -
> os=4.0 img=1.0 sys=4.0
>                
>   "cygexpat-0.dll" v0.0 ts=2007/4/7 4:43
>   118k 2008/05/09 C:\cygwin\bin\cygexpat-1.dll -
> os=4.0 img=1.0 sys=4.0
>                
>   "cygexpat-1.dll" v0.0 ts=2008/5/9 12:03
>    40k 2009/03/01
> C:\cygwin\bin\cygform-8.dll - os=4.0 img=1.0 sys=4.0
>                
>   "cygform-8.dll" v0.0 ts=2009/3/1 10:40
>    19k 2009/02/26
> C:\cygwin\bin\cyggdbm-4.dll - os=4.0 img=1.0 sys=4.0
>                
>   "cyggdbm-4.dll" v0.0 ts=2009/2/26 15:55
>     8k 2009/02/26
> C:\cygwin\bin\cyggdbm_compat-4.dll - os=4.0 img=1.0 sys=4.0
>                
>   "cyggdbm_compat-4.dll" v0.0 ts=2009/2/26 15:56
>   219k 2008/10/04 C:\cygwin\bin\cyggmp-3.dll - os=4.0
> img=1.0 sys=4.0
>                
>   "cyggmp-3.dll" v0.0 ts=2008/10/5 7:48
>   288k 2008/10/04 C:\cygwin\bin\cyggmpxx-3.dll -
> os=4.0 img=1.0 sys=4.0
>                
>   "cyggmpxx-3.dll" v0.0 ts=2008/10/5 7:48
>    24k 2008/11/29
> C:\cygwin\bin\cyghistory6.dll - os=4.0 img=1.0 sys=4.0
>                
>   "cyghistory6.dll" v0.0 ts=2008/11/29 22:30
>   270k 2009/04/23 C:\cygwin\bin\cygicons-0.dll -
> os=4.0 img=1.0 sys=4.0
>                
>   "cygicons-0.dll" v0.0 ts=2009/4/23 10:25
>   982k 2009/05/30 C:\cygwin\bin\cygiconv-2.dll -
> os=4.0 img=1.0 sys=4.0
>                
>   "cygiconv-2.dll" v0.0 ts=2009/5/31 2:38
>    37k 2003/08/10
> C:\cygwin\bin\cygintl-2.dll - os=4.0 img=1.0 sys=4.0
>                
>   "cygintl-2.dll" v0.0 ts=2003/8/11 5:50
>    31k 2005/11/20
> C:\cygwin\bin\cygintl-3.dll - os=4.0 img=1.0 sys=4.0
>                
>   "cygintl-3.dll" v0.0 ts=2005/11/20 10:04
>    31k 2008/12/31
> C:\cygwin\bin\cygintl-8.dll - os=4.0 img=1.0 sys=4.0
>                
>   "cygintl-8.dll" v0.0 ts=2008/12/31 15:42
>    83k 2007/06/06
> C:\cygwin\bin\cygmagic-1.dll - os=4.0 img=1.0 sys=4.0
>                
>   "cygmagic-1.dll" v0.0 ts=2007/6/6 18:41
>    21k 2009/03/01
> C:\cygwin\bin\cygmenu-8.dll - os=4.0 img=1.0 sys=4.0
>                
>   "cygmenu-8.dll" v0.0 ts=2009/3/1 10:38
>   121k 2008/10/04 C:\cygwin\bin\cygmp-3.dll - os=4.0
> img=1.0 sys=4.0
>                
>   "cygmp-3.dll" v0.0 ts=2008/10/5 7:48
>   264k 2009/03/02 C:\cygwin\bin\cygmpfr-1.dll - os=4.0
> img=1.0 sys=4.0
>                
>   "cygmpfr-1.dll" v0.0 ts=2009/3/2 8:14
>    66k 2009/03/01
> C:\cygwin\bin\cygncurses++-8.dll - os=4.0 img=1.0 sys=4.0
>                
>   "cygncurses++-8.dll" v0.0 ts=2009/3/1 10:50
>   237k 2009/03/01 C:\cygwin\bin\cygncurses-8.dll -
> os=4.0 img=1.0 sys=4.0
>                
>   "cygncurses-8.dll" v0.0 ts=2009/3/1 10:36
>    11k 2009/03/01
> C:\cygwin\bin\cygpanel-8.dll - os=4.0 img=1.0 sys=4.0
>                
>   "cygpanel-8.dll" v0.0 ts=2009/3/1 10:38
>   181k 2008/09/07 C:\cygwin\bin\cygpcre-0.dll - os=4.0
> img=1.0 sys=4.0
>                
>   "cygpcre-0.dll" v0.0 ts=2008/9/7 11:36
>   302k 2008/09/07 C:\cygwin\bin\cygpcrecpp-0.dll -
> os=4.0 img=1.0 sys=4.0
>                
>   "cygpcrecpp-0.dll" v0.0 ts=2008/9/7 11:36
>     7k 2008/09/07
> C:\cygwin\bin\cygpcreposix-0.dll - os=4.0 img=1.0 sys=4.0
>                
>   "cygpcreposix-0.dll" v0.0 ts=2008/9/7 11:36
>  1543k 2008/07/03 C:\cygwin\bin\cygperl5_10.dll - os=4.0
> img=1.0 sys=4.0
>                
>   "cygperl5_10.dll" v0.0 ts=2008/7/1 0:06
>    22k 2002/06/09
> C:\cygwin\bin\cygpopt-0.dll - os=4.0 img=1.0 sys=4.0
>                
>   "cygpopt-0.dll" v0.0 ts=2002/6/9 13:45
>   155k 2008/11/29 C:\cygwin\bin\cygreadline6.dll -
> os=4.0 img=1.0 sys=4.0
>                
>   "cygreadline6.dll" v0.0 ts=2008/11/29 22:30
>    65k 2009/03/02 C:\cygwin\bin\cygz.dll -
> os=4.0 img=1.0 sys=4.0
>                
>   "cygz.dll" v0.0 ts=2009/3/2 9:19
>  1829k 2008/06/12 C:\cygwin\bin\cygwin1.dll - os=4.0
> img=1.0 sys=4.0
>                
>   "cygwin1.dll" v0.0 ts=2008/6/13 1:35
>     Cygwin DLL version info:
>         DLL version: 1.5.25
>         DLL epoch: 19
>         DLL bad signal mask: 19005
>         DLL old termios: 5
>         DLL malloc env: 28
>         API major: 0
>         API minor: 156
>         Shared data: 4
>         DLL identifier: cygwin1
>         Mount registry: 2
>         Cygnus registry name: Cygnus
> Solutions
>         Cygwin registry name: Cygwin
>         Program options name: Program
> Options
>         Cygwin mount registry name:
> mounts v2
>         Cygdrive flags: cygdrive flags
>         Cygdrive prefix: cygdrive
> prefix
>         Cygdrive default prefix:
>         Build date: Thu Jun 12 19:34:46
> CEST 2008
>         CVS tag: cr-0x5f1
>         Shared id: cygwin1S4
> 
> 
> Checking for any Cygwin services...
> 
> Can't find the cygrunsrv utility, skipping services check.
> 
> 
> Cygwin Package Information
> Last downloaded files to: C:\tmp\cygwinenv
> Last downloaded files from: C:\tmp\cygwinenv
> 
> Package             
> Version
> alternatives     
>    1.3.30c-3
> ash               
>   20040127-4
> base-files       
>    3.7-1
> bash             
>    3.2.48-21
> binutils         
>    20080624-2
> bzip2             
>   1.0.5-3
> coreutils            6.10-2
> crypt             
>   1.1-1
> cygutils         
>    1.3.4-1
> cygwin           
>    1.5.25-15
> diffutils            2.8.7-1
> doxygen             
> 1.5.5-1
> e2fsprogs            1.35-3
> ed               
>    1.0-1
> expat             
>   2.0.1-1
> file             
>    4.21-1
> findutils            4.4.0-3
> gawk             
>    3.1.6-1
> gcc               
>   3.4.4-999
> gcc-core         
>    3.4.4-999
> gcc-g++             
> 3.4.4-999
> gcc-mingw           
> 20040810-1
> gcc-mingw-core       20050522-1
> gcc-mingw-g++        20050522-1
> gdb               
>   6.8-2
> grep             
>    2.5.3-1
> groff             
>   1.19.2-2
> gzip             
>    1.3.12-2
> less             
>    382-1
> libbz2_1         
>    1.0.5-3
> libdb4.5         
>    4.5.20.2-2
> libexpat0           
> 1.95.8-2
> libexpat1            2.0.1-1
> libexpat1-devel      2.0.1-1
> libgdbm4         
>    1.8.3-9
> libgmp3             
> 4.2.4-1
> libiconv2            1.13-1
> libintl2         
>    0.12.1-3
> libintl3         
>    0.14.5-1
> libintl8         
>    0.17-3
> libmpfr1         
>    2.4.1-1
> libncurses8          5.5-4
> libpcre0         
>    7.8-1
> libpopt0         
>    1.6.4-4
> libreadline6     
>    5.2.13-11
> make             
>    3.81-2
> man               
>   1.6e-1
> mingw-runtime        3.15.2-1
> perl             
>    5.10.0-5
> popt             
>    1.6.4-4
> sed               
>   4.1.5-2
> tar               
>   1.21-1
> tcltk             
>   20080420-1
> termcap             
> 20050421-1
> terminfo         
>    5.7_20090228-1
> terminfo0           
> 5.5_20061104-2
> tzcode           
>    2008h-1
> upx               
>   3.01-1
> util-linux       
>    2.14.1-1
> vim               
>   7.2-3
> w32api           
>    3.13-1
> which             
>   2.20-1
> zlib             
>    1.2.3-3
> zlib-devel       
>    1.2.3-3
> zlib0             
>   1.2.3-3
> 
> 
> 
> > 2)
> > I guess that you installed cygwin in text mode
> >
> > what does "mount" report ?
> 
> $mount
> C:\cygwin\bin on /usr/bin type system (textmode)
> C:\cygwin\lib on /usr/lib type system (textmode)
> C:\cygwin on / type system (textmode)
> c: on /cygdrive/c type system (textmode,noumount)
> d: on /cygdrive/d type system (textmode,noumount)
> I did install cygwin in text mode. I had to do this and I
> expect the
> output format always in UNIX mode.
> 

--
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/