X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.1 required=5.0 tests=BAYES_20,SARE_MSGID_LONG40,SPF_PASS,SUBJECT_FUZZY_TION X-Spam-Check-By: sourceware.org MIME-Version: 1.0 Date: Sun, 8 Mar 2009 00:36:32 -0800 Message-ID: <6509bebe0903080036h78d62a51j3b32b464736cff1a@mail.gmail.com> Subject: doc suggestions for User Guide's "Special filenames", including `cat /proc/partitions` From: S Page To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 I was trying to figure out what device mapped to my USB flash drive. I eventually used `cat /proc/partitions` to determine it was /dev/sdb1. http://www.cygwin.com/cygwin-ug-net/using-specialnames.html in the User's Guide covers this topic, but is missing some important information. Here are seven doc suggestions, five for that page and two more general. 1. The fixed-font list of devices doesn't explain what /dev/sdb might be, just /dev/sdb \device\harddisk1\partition0 On most computers with a single hard disk this will be the first external mass storage device (though I don't know what "NT internal device name" that might be). 2. The documentation says "The new fixed POSIX names are mapped to NT internal devices as follows:" but gives no explanation of what "NT internal devices" are or how to determine what NT internal device names such as \device\harddisk1\partition0 your computer has. http://support.microsoft.com/kb/235128 is a useful starting link, though it mentions only WinObj.exe that isn't present in Windows XP (and XP's Start > Programs > Administrative Tools > Computer Management doesn't reveal these device names). 3. I finally found the answer in http://sourceware.org/ml/cygwin/2007-05/msg00551.html , where Marco Atzeri suggested To have a hint about the device name $ cat /proc/partitions That worked for me! this suggestion should go in the documentation, e.g. To help determine how the disks and partitions available to your computer map to device names in /dev , enter the two commands df cat /proc/partitions the count of blocks in the output of the two commands will suggest which drive letter maps to a particular device name (/proc/partitions will have slightly higher values). For example $ cat /proc/partitions major minor #blocks name 8 0 117220824 sda 8 1 87915681 sda1 8 2 29302560 sda2 8 16 1970175 sdb 8 17 1970159 sdb1 $ df Filesystem 1K-blocks Used Available Use% Mounted on C:\cygwin\bin 87915680 76099308 11816372 87% /usr/bin C:\cygwin\lib 87915680 76099308 11816372 87% /usr/lib C:\cygwin 87915680 76099308 11816372 87% / df: `/dev/fd0': Not a directory c: 87915680 76099308 11816372 87% /cygdrive/c d: 29302556 66940 29235616 1% /cygdrive/d f: 1969888 44224 1925664 3% /cygdrive/f This suggests that drive f: is the partition /dev/sdb1 on the disk /dev/sdb. 4. I think a caution that "UNIX gives you access to raw disks and partitions, but this allows you to utterly destroy existing file systems on them without a warning" is warranted. 5. The documentation says "If you want to be able to see all devices in /dev/, you can use Igor Pechtchanski's create_devices.sh script." BUT! As I understand it, this script is not going to create the right number of devices for your computer's disks and partitions unless you modify it, which requires knowing your devices. So the documentation's "If you want to be able to see all devices in /dev/ ..." should be "If you want a directory listing of /dev/ to include all devices..." , and/or it needs a caveat, something like This script just creates well-known device names in /dev, regardless of what hardware devices are actually available on your computer. 6. The user guide web pages should have better tag for bookmarking, history, and awesome bar. This page title is just "Special filenames", it should be "Cygwin User's Guide: Special filenames" or similar. 7. There's no favicon for the user guide pages, unlike e.g. the cygwin.com home page with its link rel="icon". I also ran into a glitch where any and every variation of `df /dev/sdXN` gives information for my first partition, but I'll e-mail that as a separate bug report. Cheers, -- =S Page -- 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/