A "Mac" computer is short for Macintosh, a brand of computer from Apple Corporation. The operating system is called MacOS. The latest version, Mac OS X, runs on top of their own version of Unix called Darwin, which is a synthesis of BSD and Mach, a kernel developed at Carnegie Mellon University.
Every computer's ethernet interface card has a hardwired MAC address.
MAC also stands for Mandatory Access Control, part of the POSIX Capabilities feature set, also known as POSIX 1e. As of this writing, the standard is still experimental and is limited to high security applications. This usage is somewhat uncommon.
Mac means "son" in Irish Gaelic and Scots Gaelic, and as such, many family names start with Mac or Mc, especially in English-speaking countries. By extension, many companies and products have names that start with Mac.
The MAC address is fixed into the interface when it is manufactured. The first three bytes tell the manufacturer. Here are some examples:
00000C Cisco
00AA00 Intel
080009 Hewlett-Packard
080020 Sun
080046 Sony
08005A IBM
800010 AT&T
Do not confuse the MAC address with the IP address, which is a four byte number, segmented by bytes, but in decimal, such as 217.219.152.96. IP addresses are controlled by software. They can change, even during operation. In fact, an interface can respond to more than one IP address, for instance, when it is multihosting. A DHCP server hands out unique IP address assignments as a computer is booting up.
A MAC address is sometimes taken to be an identifying address for a computer. Unfortunately, some computers have more than one network interface card, and some have none. Often these cards can be unplugged and moved to a different computer.
When this document says, for instance, "see also man ls", simply type that
in to a command line.
$ man ls
Since we are targeting many different Unix systems, sometimes some of the entries we refer you to won't be present on your particular system. Use of the man command is always by trial and error. Pay special attention to the "SEE ALSO" section in the man pages you do read (near the end); usually this is the best way to find more man topics to read about.
Originally, the Unix programmer's manual was printed on paper, in eight sections.
Section 1: user commands (for the command line)
Section 2: system calls (for programming)
Section 3: runtime library calls (for programming)
Section 4: file formats that the system runs on
Section 5: files that the system runs on
Section 6: games
Section 7: special device files
Section 8: administration commands (for command line)
Over the years, more sections have been added, often with suffixes such as section 3MAIL, which is for runtime library calls that deal with email. Other sections have been abandoned or redefined, depending on which dialect of Unix you are running. Add-in software packages often include their own man page files. You might have to steer the man command in the event that your keyword appears in more than one section. For instance, try man 8 mount on Linux or man -s8 mount on Solaris.
Also remember that not all information is in the man pages; on GNU systems you must often use the info command. Information on how to use gui systems is often available using a separate program - check the Help menu, or the icons on the toolbar on your screen.
see also man man, info.
Unix files have a 16-bit set of flags called the mode bits or the 'file mode' for the file. Sometimes this is the 'mode' people are talking about if there's no other clues.
Mode bits are often displayed in octal, because the bit fields break down nicely that way.
bits (octal) | meaning |
0170000 | indicates the kind of file ( regular, special, directory, etc.) |
0004000 | the SUID bit (usually 0) |
0002000 | the SGID bit (usually 0) |
0001000 | the Sticky bit (usually 0) |
0000700 | permissions for file owner (user's userid = file's userid) |
0000070 | permissions for group (user a member of file's groupid, but is not the owner) |
0000007 | permissions for world (user is not owner nor member of group) |
permissions for owner, group or world
bit | meaning |
4 | Read permission |
2 | Write permission |
1 | Execute/Search permission |
For instance, a file with mode 0100750 would be a regular file (0100000), with permissions 7 for the owner of the file, 5 for people in the same group, and 0 (no access) for anybody else.
Often, only the last nine bits, the permission bits, are discussed because the rest are predictable. One would say that our example file has mode 750.
Mode bits are also often displayed in 'rwx' format, where the previous file's mode bits become - rwx r-x ---. The first character tells the file type: hyphen is a regular file, d is a directory, and so on. The last nine characters represent the last nine permission bits. A letter means the bit is 1, and a hyphen means 0. This format was popularized by the ls command.
The command line command chmod changes the permission bits for a file. It of course cannot transmute the type of a file.
There are minor variations in the rules from one platform to another, so you might want to do a man 2 stat or man chmod for more information.
The modify time for a regular file is set whenever it is written to or appended to. For a directory, it is set whenever a file is added, removed, or renamed in its list, but not for other kinds of changes to the files inside.
When you edit or modify a file, and then save the changes, sometimes the original file rewritten from the beginning. Sometimes, the original file is deleted, and a new file is created with the same name. Sometimes, the original file is renamed to an alternate name (such as filename~), and the new version is written out under the original filename. Although the resulting file is the same, the different methods can result in different access times, header times and modify times for the resulting file, and also for the directory it is in. Even viewing a file might result in its modification, depending on what program you are using. This is usually considered bad form, as this might risk damaging the data, and also needlessly changes the modify time, but it occasionally happens.
You should do some experimentation with your software, on your volume, before you trust the times, especially access times, that you see.
For example, a Linux system might have this arrangement:
disk hda5 mounted on /
disk hda6 mounted on /usr
disk hda7 mounted on /usr/local
The hda codes actually refer to the block devices in the /dev directory. Each refers to a large expanse of bytes (perhaps 2 gigabytes) in a disk partition on disk /dev/hda. Each one has been formatted so that it can be a volume on Linux.
The first volume has a subdirectory named usr. There are no files in this directory, which is fortunate because nobody can see them. If you open a Directory window in Interrogator for the directory /usr, you will instead see files that are on the root directory of the second volume. This is because /usr is the mount point for the volume.
In this /usr directory, there are several directories, but we want to pay attention to the one named local. Opening a Directory window for /usr/local, you will see files that are in the root directory for the third volume, because /usr/local is the mount point for that volume.
Now let's imagine that the superuser unmounts hda7 from /usr/local, and he finds a directory /home/low-cal to mount it on. The Host window will show this:
disk hda7 mounted on /home/low-cal
The previous mount point, /usr/local, will go back to being a normal directory on the /usr volume. The previous contents, if any, will be visible. The original contents of /home/low-cal, however, will now be invisible. (The fact that hda7 is now rooted on hda5 instead of hda6 is hardly important, except that you can't dismount /usr with /usr/local being used.)
If you have a CD or other removable disk, this will also show up in the Host window A cd might show up as this:
disk hdb mounted on /cdrom
Notice that the device has no number - the CD is not partitioned the way the hard disk was. hdb in Linux means slave IDE disk - it's just the name of the plug that the CD drive is plugged into.
Mount points are unique to Unix. In MacOS and MS Windows, all disk volumes are rooted at the top level (My Computer in Windows, or the desktop on MacOS). Unix instead has one tree hierarchy. The root volume has its mount point at the top, and other volumes have their mount points further down in the tree. Also on Unix, the name of the top level directory comes from its mount point, not the disk's own name, as in MacOS. Unix has no drive letters as with MS Windows.
Documentation >
Glossary >
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0123456789 punctuation |
|
||||