delorie.com/archives/browse.cgi   search  
Mail Archives: opendos/1997/10/13/17:18:00

Posted-Date: Tue, 14 Oct 1997 10:10:20 +1300
Date: Tue, 14 Oct 1997 10:10:18 +1300 (NZDT)
From: Perry Lorier <perry AT bart DOT hn DOT pl DOT net>
To: Hans Ecke <ecke AT tea DOT geophysik DOT tu-freiberg DOT de>
cc: -= ArkanoiD =- <ark AT mpak DOT convey DOT ru>, opendos AT delorie DOT com
Subject: Re: ls
In-Reply-To: <Pine.HPP.3.96.971013115749.28732A-100000@tea.geophysik.tu-freiberg.de>
Message-ID: <Pine.LNX.3.95.971014100620.29926A-100000@bart.hn.pl.net>
MIME-Version: 1.0

> > > DOS even don't know device files!
> > 
> > You are wrong again. Try using /dev/com1 from any program.. and..
> > ashur!ark [1:59 PM] /dev $ls -l com1
> > crw-------       1 0    0        0, 0x0002 Dec 31 1980 com1
> 
> That seems much like a Unix System! From where do you get FilePermissions?
> If I look in my directorytree I can`t find a directory c:\dev - maybe
> OpenDOS changes some interrupt to fake such a directory but why should it 
> do that?

In DOS (including MSDOS), Devices are seen as files in ALL directories
PLUS \DEV (even if it doesn't exist)

eg:

IF EXIST EMSXXXX0 Echo EMS is installed.
IF EXIST DEV\EMSXXXXXXX0 Echo EMS is still installed.
IF EXIST MSCD0001 Echo CDROM Device driver loaded: Loading MSCDEX
IF EXIST MSCD0001 MSCDEX /D:MSCD0001

Other curious side effects:

C:\> DELTREE com2
Do you wish to delete "com2"? Y
C:\>

This is how the famous: 'copy con autoexec.bat' works.  It copies bytes
from con (console) to a file (autoexec.bat) until EOF (^z)
 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019