*nix vs windows/dos vs macOS structure

*nix vs windows/dos vs macOS structure

Post by ic » Tue, 15 Jan 2002 15:40:46



I recently learned how everything under unix is a "file", whether it
be folders, devices, programs, etc.  (Correct me if I am wrong)  No
wonder devices have their own /dev directory.  It is actually pretty
cool how everything works out in *nix systems.

I was wondering if anyone would be able to give a comparison of the
file, device, folder etc. structures of *nix, windows/dos, and macOS.

 
 
 

*nix vs windows/dos vs macOS structure

Post by Erik Funkenbusc » Tue, 15 Jan 2002 16:12:18



Quote:> I recently learned how everything under unix is a "file", whether it
> be folders, devices, programs, etc.  (Correct me if I am wrong)  No
> wonder devices have their own /dev directory.  It is actually pretty
> cool how everything works out in *nix systems.

> I was wondering if anyone would be able to give a comparison of the
> file, device, folder etc. structures of *nix, windows/dos, and macOS.

Well, technically the files in /dev aren't the devices themselves, but links
to them (or more accurately, "nodes").

Windows (and DOS) also have devices that are files.  CON:  PRN:  COM1: etc..
Devices are also accessed via file handles, but the devices are not exposed
via a file system node.  Windows device drivers tend to take a lot more ioctl
functions than your typical linux devices, but they are basically very similar
at their core.

 
 
 

*nix vs windows/dos vs macOS structure

Post by Paul Colquhou » Tue, 15 Jan 2002 17:20:04



|> I recently learned how everything under unix is a "file", whether it
|> be folders, devices, programs, etc.  (Correct me if I am wrong)  No
|> wonder devices have their own /dev directory.  It is actually pretty
|> cool how everything works out in *nix systems.
|>
|> I was wondering if anyone would be able to give a comparison of the
|> file, device, folder etc. structures of *nix, windows/dos, and macOS.
|
| Well, technically the files in /dev aren't the devices themselves, but links
| to them (or more accurately, "nodes").
|
| Windows (and DOS) also have devices that are files.  CON:  PRN:  COM1: etc..
| Devices are also accessed via file handles, but the devices are not exposed
| via a file system node.  Windows device drivers tend to take a lot more ioctl
| functions than your typical linux devices, but they are basically very similar
| at their core.

Well, actually a lot of those Windows/DOS devices behave as if their
names exist as files in *every* directory.

Try and create a file called 'CON:' and see what happens!

--
Reverend Paul Colquhoun, ULC.    http://andor.dropbear.id.au/~paulcol
     Asking for technical help in newsgroups?  Read this first:
        http://www.tuxedo.org/~esr/faqs/smart-questions.html

 
 
 

*nix vs windows/dos vs macOS structure

Post by Norman D. Megi » Tue, 15 Jan 2002 18:44:33





>|
>| Windows (and DOS) also have devices that are files.  CON:  PRN:  COM1: etc..
>| Devices are also accessed via file handles, but the devices are not exposed
>| via a file system node.  Windows device drivers tend to take a lot more ioctl
>| functions than your typical linux devices, but they are basically very similar
>| at their core.

>Well, actually a lot of those Windows/DOS devices behave as if their
>names exist as files in *every* directory.

>Try and create a file called 'CON:' and see what happens!

Apparently you can't even create a file called "con.html".
Here is an email I received regarding my web site:

Quote:> Norm,

> For what it's worth to you, I had trouble extracting your mmexplorer.tar and
> auql.tar archives. Part of the problem seems to be that con.html is a
> reserved device name in Windows 2000 (and probably other versions of
> Windows). Of WinZip, WinAce and WinRar only the last succesfully extracted
> both archives except for the following files:

> con.html        (Metamath Explorer & Quantum logic Explorer)
> com1.html       (Metamath Explorer)
> com2.html       (Quantum logic Explorer)
> com3.html       (Quantum logic Explorer)

> I couldn't find the last three files on your website and I don't know why I
> couldn't extract them from your archives. Are they important?

> I was amazed at the 20 to 1 compression of your archives. A test with WinRar
> at its highest compression setting was about 10 to 1.

> [name omitted]

Is this a "feature" of Windows 2000, or just the third-party tools she
mentions?

(BTW the "amazing" compression she refers to was simply gzip -9 on Linux.)

Another email:

Quote:> I recently downloaded your Metamath archive with the 60 Megs of
> mathematical proofs.  As I was extracting the archive I noticed a
> problem.  There is within windows a bug which is known as the con/con
> bug.  For some reason, windows doesn't like things called con, nul, and
> there are some others.  Well this inhibited me from extracting con.html,
> or even viewing it(because it has to extract it to a temporary folder).
> Anyway I was just letting you know about this so you could put a readme
> or warning or make the file name con0.html or something so other people
> can extract it to windows.  I don't believe this is a problem with other
> operating systems but its a big one for windows.

Another email:

Quote:> heh, yeah, i've run into this a while ago.  it might be fine if you'd followed
> the 8.3 rule and called it con.htm, but yes, renaming it will be necessary.

> there's a few other dos keywords you have to avoid.

Does anyone know what these are?  Is there a complete list somewhere?
Sometimes I feel like I'm fighting a losing battle to satisfy the
Windows people.  My site has over 4000 files that have short mnemonic
names, e.g. "con" stands for "the class of ordinal numbers".  I rename
con.html, then com1.html pops up, etc.

Another "feature" people complain about is that Internet Explorer
sometimes corrupts a .tar.gz archive when downloading.  Apparently it
tries to be "clever" and uncompress it on the fly or something, doing it
wrong, but I've never pinned this one down nor does it seem consistent.
With wget (even the Windows version) there's never a problem.  What is
the best way to tell the average person to download a .tar.gz file?  Are
there settings in IE that prevent it from corrupting a download?

--Norm

 
 
 

*nix vs windows/dos vs macOS structure

Post by Alex Kr » Tue, 15 Jan 2002 19:18:40


For a list of invalid file names see:
http://msdn.microsoft.com/library/en-us/fileio/fsys_7qwj.asp?frame=true

It wasn't very difficult to find ...







> >|
> >| Windows (and DOS) also have devices that are files.  CON:  PRN:  COM1:
etc..
> >| Devices are also accessed via file handles, but the devices are not
exposed
> >| via a file system node.  Windows device drivers tend to take a lot more
ioctl
> >| functions than your typical linux devices, but they are basically very
similar
> >| at their core.

> >Well, actually a lot of those Windows/DOS devices behave as if their
> >names exist as files in *every* directory.

> >Try and create a file called 'CON:' and see what happens!

> Apparently you can't even create a file called "con.html".
> Here is an email I received regarding my web site:

> > Norm,

> > For what it's worth to you, I had trouble extracting your mmexplorer.tar
and
> > auql.tar archives. Part of the problem seems to be that con.html is a
> > reserved device name in Windows 2000 (and probably other versions of
> > Windows). Of WinZip, WinAce and WinRar only the last succesfully
extracted
> > both archives except for the following files:

> > con.html        (Metamath Explorer & Quantum logic Explorer)
> > com1.html       (Metamath Explorer)
> > com2.html       (Quantum logic Explorer)
> > com3.html       (Quantum logic Explorer)

> > I couldn't find the last three files on your website and I don't know
why I
> > couldn't extract them from your archives. Are they important?

> > I was amazed at the 20 to 1 compression of your archives. A test with
WinRar
> > at its highest compression setting was about 10 to 1.

> > [name omitted]

> Is this a "feature" of Windows 2000, or just the third-party tools she
> mentions?

> (BTW the "amazing" compression she refers to was simply gzip -9 on Linux.)

> Another email:

> > I recently downloaded your Metamath archive with the 60 Megs of
> > mathematical proofs.  As I was extracting the archive I noticed a
> > problem.  There is within windows a bug which is known as the con/con
> > bug.  For some reason, windows doesn't like things called con, nul, and
> > there are some others.  Well this inhibited me from extracting con.html,
> > or even viewing it(because it has to extract it to a temporary folder).
> > Anyway I was just letting you know about this so you could put a readme
> > or warning or make the file name con0.html or something so other people
> > can extract it to windows.  I don't believe this is a problem with other
> > operating systems but its a big one for windows.

> Another email:

> > heh, yeah, i've run into this a while ago.  it might be fine if you'd
followed
> > the 8.3 rule and called it con.htm, but yes, renaming it will be
necessary.

> > there's a few other dos keywords you have to avoid.

> Does anyone know what these are?  Is there a complete list somewhere?
> Sometimes I feel like I'm fighting a losing battle to satisfy the
> Windows people.  My site has over 4000 files that have short mnemonic
> names, e.g. "con" stands for "the class of ordinal numbers".  I rename
> con.html, then com1.html pops up, etc.

> Another "feature" people complain about is that Internet Explorer
> sometimes corrupts a .tar.gz archive when downloading.  Apparently it
> tries to be "clever" and uncompress it on the fly or something, doing it
> wrong, but I've never pinned this one down nor does it seem consistent.
> With wget (even the Windows version) there's never a problem.  What is
> the best way to tell the average person to download a .tar.gz file?  Are
> there settings in IE that prevent it from corrupting a download?

> --Norm

 
 
 

*nix vs windows/dos vs macOS structure

Post by Terry Port » Tue, 15 Jan 2002 20:43:03


On 13 Jan 2002 22:40:46 -0800, ice in article

Quote:>I recently learned how everything under unix is a "file", whether it
>be folders, devices, programs, etc.  (Correct me if I am wrong)  No
>wonder devices have their own /dev directory.  It is actually pretty
>cool how everything works out in *nix systems.

>I was wondering if anyone would be able to give a comparison of the
>file, device, folder etc. structures of *nix, windows/dos, and macOS.

Erik Funkenbusch will be along soon to spin the Microsoft line, but
beware, he does not supply proof for his claims, and will probably
not even bother answering your question.

Erik F is the official Cola Microsoft apologist.

Terry
--
                 _
               .' `.              Free Micro Burner
               |a_a|   http://w3w.arafuraconnect.com.au/~tp/burn.html
  Debian       \ V /
  2.2.20      /(   )\      Linux Registration Number: 103931
             |\`> < /\           http://counter.li.org
             \_|=='|_/
* OSS is long-term credible ... FUD tactics can not be used to combat it.

 
 
 

*nix vs windows/dos vs macOS structure

Post by Donn Mille » Tue, 15 Jan 2002 23:45:15



> Well, technically the files in /dev aren't the devices themselves, but links
> to them (or more accurately, "nodes").

There's also a devfs available, where the files in /dev aren't really
files at all, but a special type of memory filesystem.  I prefer "real"
files in /dev to memoryfs type files.  With this type of setup, device
files only appear in /dev if they've been probed/detected when the
kernel boots.  FreeBSD also has such a devfs, but I prefer to stay away
from it.  I'd rather have real files, so I can change permissions in
/dev at will.

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

 
 
 

*nix vs windows/dos vs macOS structure

Post by Johan Lindqui » Wed, 16 Jan 2002 00:21:51


Mon, 14 Jan 2002 at 14:45 GMT, peering quizzically at his shoes,

Quote:> There's also a devfs available, where the files in /dev aren't
> really files at all, but a special type of memory filesystem. I
> prefer "real" files in /dev to memoryfs type files. With this
> type of setup, device files only appear in /dev if they've been
> probed/detected when the kernel boots. FreeBSD also has such a
> devfs, but I prefer to stay away from it. I'd rather have real
> files, so I can change permissions in /dev at will.

I browsed tru the docs for devfs, but I didn't really bother to try
using it (yet), but I got the impression that you could indeed do
anything with it that you could with the "traditional" /dev, and then
some? What about the permissions, why can't you change them using
devfs?

cheers,

     /Johan

--
Time flies like the wind, fruit flies like bananas.        Perth ---> *
  4:19pm  up 32 days, 22:26,  4 users,  load average: 1.00, 1.03, 1.06
$ cat /dev/bollocks
syndicate dot-com channels

 
 
 

*nix vs windows/dos vs macOS structure

Post by Joe Potte » Wed, 16 Jan 2002 06:12:05



> On 13 Jan 2002 22:40:46 -0800, ice in article

>>I recently learned how everything under unix is a "file", whether it be
>>folders, devices, programs, etc.  (Correct me if I am wrong)  No wonder
>>devices have their own /dev directory.  It is actually pretty cool how
>>everything works out in *nix systems.

>>I was wondering if anyone would be able to give a comparison of the
>>file, device, folder etc. structures of *nix, windows/dos, and macOS.

> Erik Funkenbusch will be along soon to spin the Microsoft line, but
> beware, he does not supply proof for his claims, and will probably not
> even bother answering your question.

> Erik F is the official Cola Microsoft apologist.

> Terry

How do you pronounce Colama? Is it like Dali-lama?

Colama --- would there be two of them?

--
Regards, Joe
Registered Linux User 225822
Man is a bundle of habits, Windows is a bundle of bad habits.

 
 
 

*nix vs windows/dos vs macOS structure

Post by Nigel Feltha » Wed, 16 Jan 2002 06:21:23


Quote:> some? What about the permissions, why can't you change them using
> devfs?

If devices aren't real files but are generated inside the kernel then
wouldn't permission changes be lost after the next reboot?
 
 
 

*nix vs windows/dos vs macOS structure

Post by Johan Lindqui » Wed, 16 Jan 2002 06:28:53


Mon, 14 Jan 2002 at 21:21 GMT, peering quizzically at his shoes,

Quote:>> some? What about the permissions, why can't you change them using
>> devfs?

> If devices aren't real files but are generated inside the kernel
> then wouldn't permission changes be lost after the next reboot?

It's my understanding that there also runs a daemon, script, or
whatever it was, that saves your changes either semi-continuosly or at
reboot, halt, shutdown, mumble..

I'll get back to you if I work up the nerve to read the docs again, it
really sounded rather nifty except for a standard disclaimer like "if
you fsck your system up with this, and you will, don't tell me" (ok,
maybe not that dire, but anyroads..).

cheers,

     /Johan

--
Time flies like the wind, fruit flies like bananas.        Perth ---> *
 10:26pm  up 33 days,  4:33,  5 users,  load average: 1.09, 1.23, 1.17
$ cat /dev/bollocks
drive strategic channels

 
 
 

*nix vs windows/dos vs macOS structure

Post by ic » Wed, 16 Jan 2002 06:46:00


Thanks for the information.  Anyone familiar with the MacOS structure
comparison?  Probably have to go to a Mac group for that one.

> I recently learned how everything under unix is a "file", whether it
> be folders, devices, programs, etc.  (Correct me if I am wrong)  No
> wonder devices have their own /dev directory.  It is actually pretty
> cool how everything works out in *nix systems.

> I was wondering if anyone would be able to give a comparison of the
> file, device, folder etc. structures of *nix, windows/dos, and macOS.

 
 
 

*nix vs windows/dos vs macOS structure

Post by The Ghost In The Machin » Wed, 16 Jan 2002 07:59:15


In comp.os.linux.advocacy, ice
<iceman...@yahoo.com>
 wrote
on 13 Jan 2002 22:40:46 -0800
<197fef6d.0201132240.7c5af...@posting.google.com>:

> I recently learned how everything under unix is a "file", whether it
> be folders, devices, programs, etc.  (Correct me if I am wrong)  No
> wonder devices have their own /dev directory.  It is actually pretty
> cool how everything works out in *nix systems.

> I was wondering if anyone would be able to give a comparison of the
> file, device, folder etc. structures of *nix, windows/dos, and macOS.

This is an off-the-cuff response.

Paths:

Unix              DOS              Windows           Mac (pre-X)
/                 [multiple]       [multiple]        [multiple]
[mounted dir]     letter:          letter:           volume:
/dev/*            AUX,PRN,CLOCK$,etc. AUX,PRN,CLOCK$,etc.  ?
~username         no analogue      %SYSTEMROOT%/Documents And Settings/username
                                                     ?
/bin              ?                %SYSTEMROOT%/Windows/System32 or
                                   %SYSTEMROOT%/WinNT/System32
                                                     ?
/usr/bin          no analogue      %SYSTEMROOT%/Windows or
                                   %SYSTEMROOT%/WINNT
                                                     ?
/usr/local/bin    no analogue      no analogue       no analogue
/etc/passwd       no analogue      ?                 ?
/etc/shadow       no analogue      ?                 ?
/etc/pam*         no analogue      ?                 ?

Concepts:

Unix              DOS                    Windows           Mac (pre-X)
Environment variable                     Environment variable
                  Variable                           ?
Local variable    no exact analogue       ?                ?
Symbolic link     no analogue            .LNK file         ?
                                         (aka a shortcut)
Hard link         no analogue            no analogue       ?
Mount             no exact analogue      ?                 ?
Block device in
/dev/*            BIOS int13             ?                 ?
Char device in    BIOS intXX
/dev/*            or direct access       ?                 ?
Named pipe        no analogue            \\.\pipe\*        ?
pseudo-ttys       no analogue            maybe a Console,  ?
(/dev/pts/*)                             partially
no exact analogue Device redirect        Device redirect   ?
/                 / or \                 / or \            :
'-' in options    /                      / or -            ?
..                ..                     ..                ?
$VARNAME          %VARNAME%              %VARNAME%         ?
no exact analogue ?                      DirectX           ?
no exact analogue ?                      Direct3D          ?
X Windows         no analogue            Win32             Quickdraw
GTK or QT         no analogue            Win32             ?
Gnome or KDE      no analogue            Windows           ?
?                 ?                      Terminal Services ?
ssh               ssh?                   ssh               ssh?
ssh/X proxy       no analogue            ?                 ?

Commands:

Unix              DOS                    Windows           Mac (pre-X)
mv 1 2            RENAME or REN          [GUI move]        [GUI move]
mv 1 2 ... d      ?                      [GUI move]        [GUI move]
cp 1 2            COPY                   [GUI move]        [GUI move]
cp 1 2 ... d      COPY                   [GUI move]        [GUI move]
rm                ERASE or DEL           [GUI DEL]         [GUI ???]
ln -s             no analogue            Create shortcut,  ?
                                         sort of
ln                no analogue            no analogue       no analogue?
ls                DIR                    [Explorer]        [Finder]
chmod             ATTRIB                 [GUI properties]  [GUI properties]
chown             no analogue            [GUI properties]  [GUI properties]
cat               TYPE                   Notepad           ?
df                CHKDSK                 [GUI display]     [GUI display?]
locate            no analogue            [Fastfind]        ?
find              no analogue            [Fastfind]        ?
cd                CD                     [GUI]             [GUI]
pwd               CD                     [GUI]             [GUI]

There's a lot more, admittedly.

--
ew...@aimnet.com -- I have very long sleeves :-)
EAC code #191       15d:14h:13m actually running Linux.
                    The US gov't spends about $54,000/second.  I wish I could.

 
 
 

*nix vs windows/dos vs macOS structure

Post by Terry Port » Wed, 16 Jan 2002 08:06:46


On Mon, 14 Jan 2002 21:12:05 GMT, Joe Potter in article

Quote:>How do you pronounce Colama? Is it like Dali-lama?

Hahahahah!

More like the Deli-lamer ;-)

Terry
--
                 _
               .' `.              Free Micro Burner
               |a_a|   http://w3w.arafuraconnect.com.au/~tp/burn.html
  Debian       \ V /
  2.2.20      /(   )\      Linux Registration Number: 103931
             |\`> < /\           http://counter.li.org
             \_|=='|_/
* OSS is long-term credible ... FUD tactics can not be used to combat it.

 
 
 

*nix vs windows/dos vs macOS structure

Post by Peter Haye » Wed, 16 Jan 2002 10:46:36




> In comp.os.linux.advocacy, ice

>  wrote
> on 13 Jan 2002 22:40:46 -0800

>> I recently learned how everything under unix is a "file", whether it
>> be folders, devices, programs, etc.  (Correct me if I am wrong)  No
>> wonder devices have their own /dev directory.  It is actually pretty
>> cool how everything works out in *nix systems.

>> I was wondering if anyone would be able to give a comparison of the
>> file, device, folder etc. structures of *nix, windows/dos, and macOS.

> This is an off-the-cuff response.

> Paths:

> Unix              DOS              Windows           Mac (pre-X)
> Mount             no exact analogue      ?                 ?

MacOS mounts disks in a similar way to Unix, conceptually, except the
whole machine locks solid till the volume is mounted.

Peter

--

Truth, like art, is in the eye of the beholder.

 
 
 

1. DOS vs. Windows vs. Mac vs. Unix vs. NS

The C standard dictates that SEEK_SET, SEEK_CUR and SEEK_END (among others)  
must be #defined in stdio.h.  This is not a POSIX requirement.  The only  
POSIX constraints on stdio.h are that it must #define L_ctermid and  
STREAM_MAX and declare fdopen() and fileno() if _POSIX_SOURCE is #defined.  
It may optionally #define L_cuserid if _POSIX_SOURCE is #defined.

POSIX 1003.1 _does_ however, require that unistd.h #define SEEK_SET &c if  
_POSIX_SOURCE is #defined.  Thus, if you desire POSIX conformance, #include  
unistd.h.

Are you sure about the SunOS headers?  Here's a test I ran on my SPARC at  
work:

% fgrep SEEK_SET /usr/include/unistd.h
#ifndef SEEK_SET
#define SEEK_SET        0       /* Set file pointer to "offset" */
% uname -a
SunOS epimbe 4.1.1 1 sun4c

Perhaps they've moved unistd.h to /usr/5include since 4.1.1??

I do agree on this, and am rapidly tiring of system dependencies being  
handled by #ifdefs.

I've found the "POSIX Programmer's Guide" (Donald Lewine, O'Reilly, ISBN  
0-937175-73-0) to be priceless.  I strongly recommend this book to anyone  
using C, whether they be UNIX programmers or not (but particularly if they  
are).  It not only helps understand "what is defined where and by which  
standard", but also helps programmers to "Do the Right Thing" by clarifying  
what is POSIX conformant and what is historical baggage.

--
-----------------------------------------------------------------------------
Jim Vlcek                         UNIX for $166!
uunet!molly!vlcek                 Novell UnixWare from Information Foundation

2. zipdrive module problem

3. Linux vs OS2 vs NT vs Win95 vs Multics vs PDP11 vs BSD geeks

4. Alpha hardware

5. Linux/XFree speed vs OS/2 vs DOS/Windows

6. Keep user trapped in shell script, how ?

7. Linux vs Windows vs DOS future.

8. REQ: X-based thumbnail viewer/manager apps?

9. OS/2 vs DOS vs Windows for memory access

10. Linux vs Windows vs DOS future.

11. OS/2 vs DOS/Windows vs Linux re: Interrupts

12. Desktop vs Window Manager vs X11 vs OS

13. Linux Advocacy - Linux vs Windows 2000 vs Be vs OS/2