The Unix Filesystem
A short Tutorial By InSaNiTy
Some people switching from Windows seem to have trouble grasping
how the
unix filesystem works (I can't figure out why....).
For all intents and purposes, when I say filesystem, I don't
mean as in
the type, like FAT32(OpenBSD uses FFS) filesystem, I mean how
directories
work and are arranged.
The Unix Filesystem isn't much different than a Windows filesystem(well
in
the way that you navigate it). The main differences are Unix
doesn't have
the concept of "drives" like a C: drive or D: drive.
Unix can mount any
partitions on any directory, meaning that any data on that partition
is
now visible and usable by going into the directory it is mounted
under.
There are some exceptions(like needing the root directory to
even run the
system) but those go beyond basic usage. Unix is also case sensetive,
meaning "Blah" is not the same file/directory as "blah".
Unix also uses
/'s (forward slash) instead of \'s (backslash).
Examples:
For example, lets pretend you had a directory called "xspace"
on your C:
drive, and in that directory was a directory called "stuff".
In
windows(under MS-DOS for example a prompt) you would do:
cd C:\xspace\stuff
In unix that becomes:
cd /xspace/stuff
Assuming you had that directory. If there was a partition
mounted on
/xspace you would see the data on it. If there was nothing mounted
on it,
you would see nothing in it. A partition could have also been
mounted on
/xspace/stuff and when you cd'd into that directory also would
have seen
the data.
Or, showing changing dir's one at a time:
cd /usr
cd local
Or to shorten it:
cd /usr/local
If you don't understand it by now, I am sorry.
HOME |