So, why is this unique to Unix?
Typical operating systems, prior to Unix, treated files one way and treated each peripheral device according to the characteristics of that device. That is, if the output of a program was written to a file on disk, that was the only place the output could go; you could not send it to the printer or the tape drive. Each program had to be aware of each device used for input and output, and have command options to deal with alternate I/O devices.
Unix treats all devices as files, but with special attributes. To simplify programs, standard input and standard output are the default input and output devices of a program. So program output normally intended for the console screen could go anywhere, to a disk file or a printer or a serial port. This is called I/O redirection.
Does other operating systems such as Windows and Macs not operate on files?
Of course all modern OSes support various filesystems and can "operate on files", but the distinction is how are devices handled? Don't know about Mac, but Windows does offer some I/O redirection.
And, compared to what other operating systems is it unique?
Not really any more. Linux has the same feature. Of course, if an OS adopts I/O redirection, then it tends to use other Unix features and ends up Unix-like in the end.
26sidenote: macosx runs ontop of a unix. – akira – 2011-12-03T07:56:22.900
Compared to ... VMS, perhaps? – user1686 – 2011-12-03T13:12:18.720
2fwiw, while higher-level stuff doesn't use files (just like dbus or X in *nix) low-level Windows is built around handles. You can do a lot of the same with them as you can files on *nix (open, close, control, and usually send/receive), but you need to be a programmer to see that interface. Whether that's a good thing is a matter of preference. – Mark – 2011-12-04T09:38:12.810
1everything is a file, except network interfaces. – alvin – 2011-12-04T13:23:57.233
8@akira - OSX is certified Unix and doesn't run "on top of" it. – Rob – 2011-12-04T16:16:57.240
@akira What is mac? Private joke – Olivier Pons – 2011-12-05T07:47:26.820
@alvin well, sockets themselves can indeed be files. The whole interface is a little more complicated so is often several files behind the scenes – ewanm89 – 2011-12-05T14:49:41.993
@ewanm89, i was thinking of eth0 which does not appear as a file in linux. i am not sure about this behaviour in unix though. if not, my bad. – alvin – 2011-12-05T17:09:39.097
1@akira Not on top of a Unix. OSX is one of the few certified UNIX OS. – Let_Me_Be – 2011-12-08T17:07:18.847
@Let_Me_Be it depends precisely what one counts as Unix, if it's just kernel and coreutils in OSX that darwin or FreeBSD and gnu coreutils. That is the only part that is POSIX compliant and the rest. Technically anything else is not UNIX but running on top, we could throw in sysv init at a stretch. But this is pretty pedantic kind of reasoning. – ewanm89 – 2011-12-08T20:44:55.310
@ewanm89 Technically only operating systems that have UNIX certification are UNIX. – Let_Me_Be – 2011-12-08T21:03:15.320
No, certified POSIX compliant parts only, all the fluff on top (X Windows/Quartz, DE, WM... is not part of UNIX). – ewanm89 – 2011-12-10T11:50:52.353