Cygwin accessing the Windows disk directory

Source: Internet
Author: User

http://blog.csdn.net/duguduchong/article/details/7680650Cygwin accessing the Windows disk directoryTags: Windows disk user Platform C2012-06-20 17:51 5771 People read Comments (1) favorite reports Classification:Windows (one)

Just touching Cygwin, the first question is: How to access the various disk directories of Windows, and how to access directories in Cygwin under the Windows platform.

After you execute the Mount command, you can see that the drive letter under Windows is mapped to the/cygdrive special directory.

    1. $ mount
    2. C:/cygwin/bin on/usr/bin type NTFS (BINARY,AUTO)
    3. C:/cygwin/lib on/usr/lib type NTFS (BINARY,AUTO)
    4. C:/cygwin on/type NTFS (binary,auto)
    5. C:ON/CYGDRIVE/C type NTFS (binary,posix=0,user,noumount,auto)
    6. D:ON/CYGDRIVE/D type NTFS (binary,posix=0,user,noumount,auto)

In other words, the C:\Windows directory under Windows is accessed in Cygwin with path/cygdrive/c/windows. In fact, Cygwin provides the Cygpath command to implement a transformation of the directory name between the Windows platform and Cygwin, as follows:

    1. $ cygpath-u C:\\Windows
    2. /cygdrive/c/windows
    3. $ cygpath-w ~/
    4. C:\cygwin\home\jiangxin\

As can be seen from the above example, the user home directory under Cygwin (that is,/home/jiangxin/) is equivalent to the C:\cygwin\home\jiangxin\ directory under Windows.

Transfer from http://book.51cto.com/art/201107/278828.htm

Cygwin accessing the Windows disk directory

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.