everything is a file

back to index

description: defining feature of Unix, and its derivatives

4 results

pages: 612 words: 187,431

The Art of UNIX Programming
by Eric S. Raymond
Published 22 Sep 2003

We can make the patterns explicit by analyzing some of the most important ways that operating systems differ. What Is the Operating System's Unifying Idea? Unix has a couple of unifying ideas or metaphors that shape its APIs and the development style that proceeds from them. The most important of these are probably the “everything is a file” model and the pipe metaphor[20] built on top of it. In general, development style under any given operating system is strongly conditioned by the unifying ideas baked into the system by its designers — they percolate upwards into applications programming from the models provided by system tools and APIs.

All of Microsoft's operating systems since the demise of Windows ME in 2000 have been NT-based; Windows 2000 was NT 5, and Windows XP (current in 2003) is NT 5.1. NT is genetically descended from VMS, with which it shares some important characteristics. NT has grown by accretion, and lacks a unifying metaphor corresponding to Unix's “everything is a file” or the MacOS desktop.[33] Because core technologies are not anchored in a small set of persistent central metaphors, they become obsolete every few years. Each of the technology generations — DOS (1981), Windows 3.1 (1992), Windows 95 (1995), Windows NT 4 (1996), Windows 2000 (2000), Windows XP (2002), and Windows Server 2003 (2003) — has required that developers relearn fundamental things in a different way, with the old way declared obsolete and no longer well supported.

Each of the technology generations — DOS (1981), Windows 3.1 (1992), Windows 95 (1995), Windows NT 4 (1996), Windows 2000 (2000), Windows XP (2002), and Windows Server 2003 (2003) — has required that developers relearn fundamental things in a different way, with the old way declared obsolete and no longer well supported. There are other consequences as well: The GUI facilities coexist uneasily with the weak, remnant command-line interface inherited from DOS and VMS. Socket programming has no unifying data object analogous to the Unix everything-is-a-file-handle, so multiprogramming and network applications that are simple in Unix require several more fundamental concepts in NT. NT has file attributes in some of its file system types. They are used in a restricted way, to implement access-control lists on some file systems, and don't affect development style very much.

pages: 483 words: 145,225

Rebel Code: Linux and the Open Source Revolution
by Glyn Moody
Published 14 Jul 2002

Fred Brooks’s classic 1974 book of essays, The Mythical Man-Month, was an early and perceptive analysis of the problems of managing large software projects. With the new Unix came a new way of thinking about operating systems. “The Unix philosophy is really very easy,” Salus says, “and consists of maybe two or three notions. The first one, which is perhaps the most innovative thing that Thompson ever thought of, is that everything is a file. Second is the notion that when you build something, no matter whether it’s an editor or whether it’s a way of attaching one file to another file, you write things that are for a single purpose but do that purpose well.” Although the first of these would have some amusing personal consequences for Linus, it was the second element that proved key for the success of Linux.

He had been trying to connect with the university’s computer, but by mistake instructed his terminal emulator program to dial his hard disk. Contrary to appearances, this was an easy thing to do, thanks to what Peter Salus had called “perhaps the most innovative thing that [Unix’s creator] ever thought of,” which was that everything is a file for Unix and hence for Linux. This means no conceptual difference exists between sending data to a modem or to a disk drive. This slip wiped out the Minix system that Linus had kept alongside the steadily growing Linux. Initially, Minix had formed an indispensable scaffolding for the development of Linux; but since Linux could now function without the crutch of Minix, there was no reason to re-install Minix after this mishap.

pages: 260 words: 40,943

Hacking Exposed: Network Security Secrets and Solutions
by Stuart McClure , Joel Scambray and George Kurtz
Published 15 Feb 2001

A system can be extremely secure out of the box, but if the system administrator changes the permission of the /etc/passwd file to be world writable, all security just goes out the window. It is the human factor that will be the undoing of most systems. File and Directory Permissions Popularity: 8 Simplicity: 9 Impact: 7 Risk Rating: 8 UNIX’s simplicity and power stem from its use of files—be they binary executables, text-based configuration files, or devices. Everything is a file with associated permissions. If the permissions are weak out of the box, or the system administrator changes them, the security of the system can be severely affected. The two biggest avenues of abuse related to SUID root files and world-writable files are discussed next. Device security (/dev) is not addressed in detail in this text because of space constraints; however, it is equally important to ensure that device permissions are set correctly.

pages: 496 words: 174,084

Masterminds of Programming: Conversations With the Creators of Major Programming Languages
by Federico Biancuzzi and Shane Warden
Published 21 Mar 2009

Most of the places I’ve seen AWK are command lines or shell scripts. Al: Applications where you can compose problems on the command line, or create shell scripts that are a combination of Unix commands, are very popular AWK programs. This style of problem solving epitomized early AWK applications on Unix, and even many Unix applications today. In Unix, “everything is a file.” Do you have a vision of what might be considered the “file” of the Internet? Al: Files are a nice simple abstraction that should be used wherever they are appropriate. The Internet of today, however, has become much richer in data types and programs often have to deal with streams of concurrent interactive multimedia data.