Alias (Mac OS)
Encyclopedia
In Mac OS
Mac OS
Mac OS is a series of graphical user interface-based operating systems developed by Apple Inc. for their Macintosh line of computer systems. The Macintosh user experience is credited with popularizing the graphical user interface...

 System 7
System 7 (Macintosh)
System 7 is a single-user graphical user interface-based operating system for Macintosh computers. It was introduced on May 13, 1991 by Apple Computer. It succeeded System 6, and was the main Macintosh operating system until it was succeeded by Mac OS 8 in 1997...

 and later, an alias is a small file that represents another object in a local, remote, or removable file system
File system
A file system is a means to organize data expected to be retained after a program terminates by providing procedures to store, retrieve and update data, as well as manage the available space on the device which contain it. A file system organizes data in an efficient manner and is tuned to the...

 and provides a dynamic link to it; the target object may be moved, and the alias will still link to it (unless the original file is recreated; such an alias is ambiguous and how it is resolved depends on the version of Mac OS X). In Windows, the same function is performed with a "shortcut" (a file with a .lnk extension); in most circumstances, moving the target file breaks the link.

It is similar to the Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 symbolic link
Symbolic link
In computing, a symbolic link is a special type of file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution. Symbolic links were already present by 1978 in mini-computer operating systems from DEC and Data...

, but with the added benefit of working even if the target file moves to another location on the same disk (in this case it acts like hard link
Hard link
In computing, a hard link is a directory entry that associates a name with a file on a file system. . The term is used in file systems which allow multiple hard links to be created for the same file. This has the effect of creating multiple names for the same file, causing an aliasing effect: e.g...

, but the source and target of the link may be on different filesystems). As a descendant of BSD, Mac OS X supports Unix symbolic (and hard) links as well.

Function

An alias acts as a stand-in for any object in the file system, such as a document
Document
The term document has multiple meanings in ordinary language and in scholarship. WordNet 3.1. lists four meanings :* document, written document, papers...

, an application
Application software
Application software, also known as an application or an "app", is computer software designed to help the user to perform specific tasks. Examples include enterprise software, accounting software, office suites, graphics software and media players. Many application programs deal principally with...

, a folder
Folder
Folder may refer:* File folder, a kind of folder that holds loose papers* Folder , a virtual container within a digital file system, in which groups of files and other folders can be kept and organized...

, a hard disk
Hard disk
A hard disk drive is a non-volatile, random access digital magnetic data storage device. It features rotating rigid platters on a motor-driven spindle within a protective enclosure. Data is magnetically read from and written to the platter by read/write heads that float on a film of air above the...

, a network share or removable medium or a printer
Computer printer
In computing, a printer is a peripheral which produces a text or graphics of documents stored in electronic form, usually on physical print media such as paper or transparencies. Many printers are primarily used as local peripherals, and are attached by a printer cable or, in most new printers, a...

. When double-clicked, the computer will act the same way as if the original file had been double-clicked. Likewise, choosing an alias file from within a 'File Open' dialog box
Dialog box
In a graphical user interface of computers, a dialog box is a type of window used to enable reciprocal communication or "dialog" between a computer and its user. It may communicate information to the user, prompt the user for a response, or both...

 would open the original file. The purpose of an alias is to assist the user in managing large numbers of files by providing alternative ways to access them without having to copy the files themselves. While a typical alias under the classic Mac OS was small, between 1 and 5 KB, under Mac OS X it can be fairly large, more than 500 KB for the alias to a folder.

Preventing Alias Failure

An alias is a dynamic reference to an object. The original may be moved to another place within the same filesystem, without breaking the link. The operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

 stores several pieces of information about the original in the resource fork
Resource fork
The resource fork is a construct of the Mac OS operating system used to store structured data in a file, alongside unstructured data stored within the data fork. A resource fork stores information in a specific form, such as icons, the shapes of windows, definitions of menus and their contents, and...

 of the alias file. Examples of the information used to locate the original are:
  • path
  • file ID
  • directory ID
  • name
  • file size


Since any of these properties can change without the computer's knowledge, as a result of user activity, various search algorithms are used to find the most plausible target. This fault-tolerance sets the alias apart from similar functions in some other operating systems, such as the Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 symbolic link
Symbolic link
In computing, a symbolic link is a special type of file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution. Symbolic links were already present by 1978 in mini-computer operating systems from DEC and Data...

 or the Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 shortcut
Computer shortcut
A file shortcut in Microsoft Windows is a small file containing a target URI or GUID to an object, or the name of a target program file that the shortcut represents. The shortcut might additionally specify parameters to be passed to the target program when it is run. Each shortcut can have its own...

, at the expense of increased complexity and unpredictability. For example, an application can be moved from one directory to another within the same filesystem, but an existing alias would still launch the same application when double-clicked.

The question can arise of how an alias should work if a file is moved, and then a file is created with the same name as the original moved file, since the alias can be used to locate both the original name and the new location of the original file. With symbolic links the reference is unambiguous and refers to the new file. Before Mac OS X.2, however, such an ambiguous alias would consistently find the original moved file, rather than the recreated file. From Mac OS X.2, the new file is found, matching the behaviour of symbolic linkshttp://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFileSystem/Articles/Aliases.html. Mac OS X applications can programmatically use the old behavior if required.

Aliases are similar in operation to shadow
Shadow (OS/2)
In the graphical Workplace Shell of the OS/2 operating system, a shadow is an object that represents another object.A shadow as a stand-in for any other object on the desktop, such as a document, an application, a folder, a hard disk, a network share or removable medium, or a printer. A target...

s in the graphical Workplace Shell
Workplace Shell
The Workplace Shell is a object-oriented desktop shell produced by IBM's Boca Raton development lab for OS/2 2.0. It is based on Common User Access and made a radical shift away from the Program Manager type interface that earlier versions of OS/2 shared with Windows 3.x or the...

 of the OS/2
OS/2
OS/2 is a computer operating system, initially created by Microsoft and IBM, then later developed by IBM exclusively. The name stands for "Operating System/2," because it was introduced as part of the same generation change release as IBM's "Personal System/2 " line of second-generation personal...

 operating system.

Distinguishing marks

In System 7 through Mac OS 9
Mac OS 9
Mac OS 9 is the final major release of Apple's Mac OS before the launch of Mac OS X. Introduced on October 23, 1999, Apple positioned it as "The Best Internet Operating System Ever," highlighting Sherlock 2's Internet search capabilities, integration with Apple's free online services known as...

, aliases distinguished themselves visually to the user by the fact that their file names were in italics. To accommodate languages that don't have italics (such as Japanese
Japanese language
is a language spoken by over 130 million people in Japan and in Japanese emigrant communities. It is a member of the Japonic language family, which has a number of proposed relationships with other languages, none of which has gained wide acceptance among historical linguists .Japanese is an...

), in Mac OS 8.5
Mac OS 8
Mac OS 8 is an operating system that was released by Apple Computer on July 26, 1997. It represented the largest overhaul of the Mac OS since the release of System 7, some six years previously. It puts more emphasis on color than previous operating systems...

 another distinguishing mark was added, badging with an "alias arrow" - a black arrow with a small white border - similar to that used for shortcuts in Microsoft Windows.

In Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

, the filenames of aliases are not italicized, but the arrow badge remains.

Managing aliases

In System 7, the only way to create an alias was to select the original and choose "Make Alias" from the "File" menu. An alias, with the same name and " alias" appended would then be created in the same folder. In later versions, it became possible to create aliases by drag-and-drop
Drag-and-drop
In computer graphical user interfaces, drag-and-drop is the action of selecting a virtual object by "grabbing" it and dragging it to a different location or onto another virtual object...

, while holding down the command and option modifier keys.

Mac OS 8.5 added a feature for re-connecting aliases that had been broken for one reason or another (when the simple search algorithms failed to find a reliable replacement).

In Mac OS 9 and X options were added for command
Command key
The Command key, also historically known as the Apple key, open-Apple key or meta key is a modifier key present on Apple Keyboards. The Command key's purpose is to allow the user to enter keyboard shortcut commands to GUI applications...

-option
Option key
The Option key is a modifier key present on Apple keyboards. It is located between the Control key and Command key on a typical Mac keyboard. There are two option keys on modern Mac desktop and notebook keyboards, one on each side of the space bar....

 dragging an object in the Finder to create an alias at that location. This is where the was added to the system.

External links

  • Alias Manager ReferenceInside Macintosh
    Inside Macintosh
    Inside Macintosh is the name of the developer documentation manuals published by Apple Computer, documenting the APIs and machine architecture of the Macintosh computer....

    developer documentation
  • System 7 aliases — Article about System 7 aliases, from 1992
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK