X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: Reply-To: From: =?iso-8859-1?Q?Andr=E9_Bleau?= To: Subject: Re: Defrag and some other exe not seen by cygwin on XP64 Date: Tue, 18 Nov 2008 21:20:21 -0500 Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id mAJ2LiP2000317 Bruce Dobrin wrote: > This is weird > I couldn't find it in my search of the site; > I was on a XP64 machine and tried to run the defrag command from the Cygwin shell > and it could not locate the command. I could see the command via the cmd shell. > Below I cd usng the cmd shell on 64bit XP and using ls it is not seen and dir it is seen: > C:\WINDOWS\system32>ls |grep defrag > C:\WINDOWS\system32>dir |grep defrag > 02/16/2007 08:33 PM 35,840 defrag.exe > C:\WINDOWS\system32>cacls defrag.exe > C:\WINDOWS\system32\defrag.exe BUILTIN\Administrators:F > NT AUTHORITY\BATCH:R > Everyone:R > NT AUTHORITY\INTERACTIVE:R > NT AUTHORITY\SERVICE:R > NT AUTHORITY\SYSTEM:F > I then copied the file in the cmd shell to c:\cygwin\ and then Cygwin can see it there: > dobrin AT dodo:/c/WINDOWS/system32> ls -al ./defrag > ls: cannot access ./defrag: No such file or directory > dobrin AT dodo:/c/WINDOWS/system32> cd / > dobrin AT dodo:/> ls -al ./defrag >> -rwx------+ 1 dobrin Domain Users 35840 Feb 16 2007 ./defrag > I confirmed that this isn't an issue on XP32 or Vista > > And Ideas? > Thanks For 32 bit processes (like bash), C:\Windows\System32 is aliased to C:\Windows\SysWOW64. 64 bit processes (like the 64 bit version of cmd) see the real C:\Windows\System32. For more about this weirdness, see: http://searchenterprisedesktop.techtarget.com/tip/0,289483,sid192_gci1204121,00.html If you would like your bash shell see the content of the real System32 folder, you can do the following: As administrator in a 64 bit cmd (NOT a bash shell): C: cd \Windows mklink /D System64 System32 Then you can access the real System32 folder via the System64 symbolic link: $ ls -l /cygdrive/c/Windows/System64/Defrag.exe -rwxrwx---+ 2 ???????? ???????? 232960 Jan 19 2008 /cygdrive/c/Windows/System64/Defrag.exe HTH, - André Bleau, Cygwin's volunteer OpenGL package maintainer. Please direct any question or comment about the OpenGL package to cygwin at cygwin dot com _________________________________________________________________ -- 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/