Posted as a service for those who are having trouble falling asleep.
Lost me at:
“On a UNIX system, everything is a file; if something is not a file, it is a process.”
Bump
What is remarkable is UNIX is about 50 years old as an OS. A half-century old! And it is still the best foundation for a computer system to date.
Great reference source! It explains some of the differences between the file structures compared to MS. The file type table is great!
Fixed it for you.
"On a UNIX system, everything is a file; if something is not a file, it is a process."
Technically true, but even processes are files.
$ ps -ef | grep fox zeugma 11226 10939 1 Jan16 ? 02:05:41 /usr/lib/firefox/firefox $ ls /proc/11226 attr clear_refs cpuset fd limits mem net oom_score projid_map sessionid stat task autogroup cmdline cwd fdinfo loginuid mountinfo ns oom_score_adj root setgroups statm timers auxv comm environ gid_map map_files mounts numa_maps pagemap sched smaps status uid_map cgroup coredump_filter exe io maps mountstats oom_adj personality schedstat stack syscall wchan $ cat /proc/11226/status | head -3 Name: firefox State: S (sleeping) Tgid: 11226 $
/proc is really cool.
Back in the old days, when I'd try to help folk out with computers, I had a lecture that I called "The Fully Qualified File Name". Once I went through the entire lecture with someone they would actually understand how and why things were laid out the way they are on their computer, and how to organize and reference anything they wanted to. One of the most powerful tools for directory navigation is the '.' and '..' directories. Once you really understand relative pathnames, you understand a lot about disk structures. That was as true with DOS as it was for Linux. We would start with just the "cd" and "dir" commands because they are absolutely non-destructive, and go all over the disk, using ../. so they'd know the difference between absolute and relative paths and such. Fortunately under windows there was no such thing as symlinks so it was pretty straightforward.
I recall being able to demonstrate the fact that 'everything is a file' on DOS and early MS-Windows computers was to go to any directory and use the command: dir con, or dir prn. These two files, which represent your console/screen and printer respectively existed in every directory even though they don't show up unless you ask for the name(s) specifically. There were a few others as well that don't come readily to mind.