Mac OS X Unleashed

Mac OS X Unleashed

By John Ray and William C. Ray

Finder File Operations

Because you're reading an Unleashed title, you probably already know the basics of most graphical operating systems: click and drag files to move them, double-click applications to launch them. Mac OS X doesn't break any new ground in the handling of files. Everyone who has used Windows, KDE/GNOME, or an earlier version of Mac OS will be able to carry their existing knowledge over to the new operating system. To be thorough, this portion of the chapter will serve as a quick reference to standard file and application operations.

Moving Files and Folders

Moving a file changes its location, but does not alter the contents of the file or its creation and modification dates. To move a file on Mac OS X, drag its icon to the folder or location where you want it to reside. If you are dragging within a Finder window, the window will automatically scroll as your cursor reaches the border, allowing you to move around within the view without having to drop the icon and manually scroll the window. Sadly, this does not hold true for the Column view.

If you are attempting to move a file from one device (such as a disk) to another, the file will be copied instead of moved. The original file will stay in its current location, and a new version will be created on the other storage media. You must delete the original copy of the file if you do not want to keep multiple versions of the file.

Copying Files and Folders

Copying a file creates an exact duplicate of an original file. The new file sports a new creation and modification date, although the contents are identical to the original. There are a number of ways to create a copy on Mac OS X.

As the file copies, the Finder will display a window, like that in Figure 4.17, where you can see the progress of the copy operation. If multiple copies are taking place at the same time, the status of each operation will be shown stacked on one another in the copy status window. There are two copies taking place in Figure 4.17. If you'd like to collapse the copy to show only summary information about the copy (time remaining), click the disclosure triangle at the left of the copy status.

04fig17.jpg

Figure 4.17 A single window contains all the status information for multiple copy operations.

If you attempt to copy over existing files, the Finder will prompt you whether you want to replace them. Remember that under Mac OS X, you cannot alter certain system files and directories or another user's files. If you attempt to replace existing files to which you do not have access, the copy operation will fail.

Deleting Files and Folders

Deleting files and folders permanently removes them from your system. Although the Mac OS X Finder has a new Undo menu, it cannot undo the effects of erasing a file from your system. Like copying a file, there are a number of ways to delete one:

Moving an item to the trash does not delete it permanently from your drive. Instead, it places the item inside an invisible folder called .Trash—you cannot see or access this folder directly from the Mac OS X GUI. If you're interested in getting to the contents of the folder, check out the discussion of command-line navigation, starting in Chapter 12. The Trash Can icon in the Dock fills with crumpled paper when it contains items waiting to be deleted.

Although Mac OS X doesn't give you a true representation of the .Trash folder, it does let you view the contents of the trash by clicking the Trash Can icon. The Trash window works identically to other Finder windows. If you want to rescue a file you've accidentally sent to the trash, you can drag the file's icon out of the trash.

To completely remove a file from your system, choose Empty Trash from the Finder's application menu, or press Shift+Command+Delete. Alternatively, you can Control-click or click and hold on the trash can, and choose Empty Trash from the resulting pop-up menu.

Emptying the trash might take a few moments if you are deleting a large number of files. During this time, the Finder will bring up a dialog box very similar to the Copy dialog box. You can click Stop to cancel the trash operation, sparing the files that haven't yet been erased.

Creating Aliases

An alias is a representation of a file that, for all intents and purposes, appears to be the file. Windows users will recognize it as being similar to a shortcut.

Suppose that you have a document called My Diary buried deep in your drive, but you want to leave a copy of the icon on your desktop. Rather than duplicating the file and maintaining two copies, you can create an alias of the original file, and then place the alias wherever you'd like. Accessing the alias is the same as accessing the real file. The Finder uses aliases for things like Recent Folders and Favorites. Rather than having to move the real directories, it can just create aliases of them. You can tell an alias from the original by the arrow in the lower-left corner of the icon. Figure 4.18 shows the Favorites folder, filled with aliases to other folders.

04fig18.jpg

Figure 4.18 Aliases represent real files on your system.

There are two ways to create aliases:

Although aliases can be used to represent the original file, throwing them away does not delete the original file. Alternatively, deleting the original file doesn't delete the alias. If the original file is erased, the alias simply becomes broken. Double-clicking a broken alias will display a dialog similar to the one in Figure 4.19.

04fig19.jpg

Figure 4.19 Broken aliases can be deleted or fixed.

If you'd just like to get rid of a broken alias, click the Delete Alias button. If you want to point the alias to a different file, choose Fix Alias, locate the file you want to use, and the alias will be reattached. To leave things the way they are, click OK.

Show Original

To locate the file to which an alias points, select the alias and choose Show Original (Command+R) from the Finder's File menu. The original file will be highlighted in the Finder.

Launching Applications/Documents

We're saving the easiest for last. Launching an application is a matter of double-clicking its icon, or dragging a document on top of the application's icon. In the latter case, the application will start and load or process the document that was dropped on it.

You can also launch an application by selecting it, and then choosing Open from the Finder's File menu or from the application's contextual menu.

While an application is launching, its icon will bounce in the Dock. With 10.1, your software will be running in seconds. If you're stuck with the initial release of Mac OS X, applications can take 10–20 bounces to load—even on fast machines!

Unrecognized Files

If you attempt to double-click a document that the system does not recognize, Mac OS X will warn you that there is "no application available to open the document" you've tried to access, as demonstrated in Figure 4.20. If you're sure that a program on your system is capable of viewing the file, select the Choose Application…. You will be prompted to choose the application that will open the file. If the system does not allow you to pick the appropriate application, change the selection in the Show pop-up menu to read All Applications rather than Recommended Applications. By default, the system tries to guess the best app for the job—sometimes it fails miserably.

04fig20.jpg

Figure 4.20 If a file can't be opened, you can choose an application to open it with.

You can also fix unrecognized files by setting the application to open them through the Show Info Finder command, discussed later in this chapter.

Renaming Files

To rename a file in the Finder, click once to select the file, and then click a second time on the file's name. The filename will become editable in a few seconds. If you're the impatient sort, just press Return after selecting an icon; you'll immediately find yourself in edit mode.

Alternatively, you can use the Show Info option in the Finder File menu to edit the name in a larger field.

The Edit Menu

The Edit menu is used universally in almost every application that you'll run under Mac OS X. It has been duplicated on Linux, Windows, and just about every other GUI-based OS on the planet. The Edit menu allows a user to quickly select, copy, and cut information from one place in the system and paste it somewhere else. While the information is waiting to be added to another document, it is temporarily housed in what is called the Clipboard.

Mac OS X has six basic features available from the Finder's Edit menu:

Share ThisShare This

Informit Network