X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org From: "Dave Korn" To: "'Cygwin'" References: <1189782531 DOT 24064 DOT 8 DOT camel AT mercury DOT sprymusic> Subject: RE: Whither /dev/null ? Date: Fri, 14 Sep 2007 16:15:02 +0100 Message-ID: <025001c7f6e2$05ef0220$2e08a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <1189782531.24064.8.camel@mercury.sprymusic> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On 14 September 2007 16:09, Jean-Claude Gervais wrote: > If I write the following > > ls > nul > > It works as expected under Cygwin, however under Linux I must write > > ls > /dev/null 'NUL' is a DOS device name, like COM1; cygwin implicitly supports it because when it passes the open call to the underlying OS, the OS opens NUL as if it were a real file that existed in every directory. /dev/null is the linux equivalent, and it works on cygwin too. > I searched and found discussions on the Cygwin mailing list that seemed > to say that Cygwin supported (supports?) the /dev/null device, but I > checked my installation and this pseudo-device didn't seem to exist on > my system. The '/dev' folder was missing. > > I discovered that if I created the folder '/dev', afterwards > the /dev/null device existed, even if it does not appear as an actual > file under /dev > > I installed cygwin only a few weeks ago using the > http://www.cygwin.com/setup.exe method, and it was missing the /dev > folder. > > I compared this to the other machines around me which are running a > version of Cygwin which is about two years old, same results: /dev is > missing, but creating it unleashes the /dev/null pseudo-device. Yes, /dev is missing, it's a pseudo-directory. Creating it allows you to *see* /dev/null in a dir listing, but even without doing so, /dev/null *does* work, right from the off. > I'm wondering what is the best way to deal with this? Just use '/dev/null' always and everywhere, it works perfectly on both cygwin and linux, regardless of whether or not you actually create a real physical /dev directory. cheers, DaveK -- Can't think of a witty .sigline today.... -- 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/