Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Unit_3.docx
Скачиваний:
1
Добавлен:
01.05.2025
Размер:
84.93 Кб
Скачать

3.3.2 File and Printer Sharing

  • Files

  • Printers

Files and printers are resources of the computer that are shared in a networking environment, allowing many users to access one drive, file, or printer remotely.

Files

Files may be shared between applications, such as when a graph created in Excel is linked into a Word document. Files may also be shared between users over a network. But, some files will need to be kept private; other users should not be able to access them. To accomplish this, the operating system defines a set of permissions for a file or directory. These permissions, also called Access Control Lists (ACLs), determine who can read, write, or execute the file. Read access allows the user to read the file. Write accessallows a user to modify or delete the file. Execute access allows the user to perform special system operations—such as viewing the contents of a directory or executing a program. In Microsoft Windows, you can examine a file's permissions by right-clicking the file icon, clicking Properties on the shortcut menu that appears, and then clicking theSecurity tab.

Printers

Printers are shared between applications, between users, and even between machines. When a file is to be printed, it is handed off to a part of the operating system called a print server that maintains a queue of print requests. The server processes requests one at a time. As requests come in, they are stored on disk, in a process known as spooling. ("Spool" stands for Simultaneous Peripheral Operation Online). Spooling allows the process issuing the print request to go on to other things; it does not have to wait for the document to complete printing. If the print server can communicate over a network, then print requests can be accepted from other machines. A typical example is a computer lab where all the computers share a single print server. This is more efficient than installing a separate printer on each machine.

3.4 File Systems

A file system is an abstraction for organizing data on mass storage media such as hard drives, floppy disks, and optical disks. The file systems are managed by the operating system of a computer. In this section, you will learn about how files are organized on a Windows operating system, as well as how file systems work.

3.4.1 File Organization

  • Files

  • Folders

  • Drives

  • Paths

  • Shortcuts

  • File Names and Types

One of the main things computers are used for is storing and retrieving information. The information is stored in one or more "files," which in turn are organized into "folders." The Microsoft Windows file system supports four kinds of entities: files, folders, drives, and shortcuts. The figure below illustrates how files are organized from the perspective of a Windows operating system user.

Figure 1 File organization in a Windows operating system

Files

Each file contains some data. When a file is associated with a particular application, such as Microsoft Word, Excel, or Power Point, it is often called a document. Every file has a name. In Windows, file names can be up to 255 characters long and can contain letters, numbers, and certain special characters, including spaces. Although Windows allows use of both uppercase and lowercase letters in a file name, the distinction is ignored by the file system. Thus if you create a file named Friends, you can also access it as friendsor FRIENDS or even fRiEnDs. Other operating systems, such as Unix/Linux, are sensitive to capitalization. In these operating systems, the files Friends.txt and friends.txt are different.

Every file also has a set of properties associated with it. The most important property is the file type, which indicates to the operating system what application to use to open the file. Other properties include the size of the file, the date and time the file was created, and the date and time the file was last modified. You can view a file's properties by clicking with the right mouse button the file icon and selecting Properties on the pop-up menu. If you have access to a Windows machine, try this now. Another way to see file types and sizes is to go to the View menu in the Folder window and click Details.

Folders

Files reside in folders, which are sometimes called directories. Folders have names and properties too. And, like files, every folder has a residency: it is located in another folder called its parent. This gives the file system a hierarchical structure, like a family tree. That is where the term "parent" comes from. Another good analogy is a company organization chart, where every employee has a boss above him, except for the president at the top. The top of the folder hierarchy is called the root.

The file system will not permit two items in a folder to have the same name. You can verify this by creating two files in your working folder called file1 and file2. If you then try to change the name of file2 to file1, you will get an error message, and the change will not be completed. In the diagram above, there are two files named sales.xls, but they are in different folders.

Drives

Folders are housed in the computer drive. A computer can have many drives, drive A, drive C, drive D, drive E, etc. One way to access the drives is by double-clicking on the icon named "My Computer" on your Desktop. This icon is normally located in the upper-left corner of the Desktop. After you double-clicked on the My Computer icon, you will see that each drive is labeled by an icon that indicates the type of medium the drive uses. For example, the hard drive icon is a picture of a hard drive, and the optical drive icon is a picture of a CD-ROM. Clicking a drive's icon will take you to the root directory of that drive.

Paths

Since items in different folders can have the same name and folders can be nested within other folders, we need a way to instruct the operating system or an application exactly which object (that is, which file or folder) we are referring to. We can do this by specifying the complete path to the object, from the root directory. The first sales file in the diagram above can be reached via the path C:\Dave\1998\sales.xls. As you can see, a path contains a drive designator and a sequence of folder names separated by backslashes—and then, if we are referring to a file, the name of the file itself. The path to the root directory on this drive is written C:\ . You can get Windows to display the full path in the title bar of a folder window by going to the View menu and selecting Options. Then go to the View tab and select the check box labeled Display full paths in the title bar.

Shortcuts

shortcut is an alternate way to reach a file. Shortcuts have names and live in folders just the way files do. But, a shortcut does not actually hold any data. Instead, it has a shortcut property that specifies the path to the file where the data can be found. This file is called the target of the shortcut. The target can be anywhere, even on a different drive. A shortcut only refers to its target; it is not a copy of the target. So, when you open a shortcut and edit what you find there, you are actually editing the target file.

In the folder hierarchy diagram above, Karen has established a shortcut to Dave's 1999 sales data. The target of this shortcut is C:\Dave\1999\sales.xls. Karen's shortcut is named 99sales. Thus, another way to reach Dave's file is via C:\Karen\99sales. If Karen deletes her shortcut, this does not delete the target; Dave's file is still there. Moving or renaming a shortcut also does not affect the target. But, if Dave moves or renames his sales file, Karen's shortcut may not be able to retrieve Dave's file.

Shortcuts can point to folders as well as to files. To create a shortcut, click with the right mouse button (right-click) the icon for the file or folder that is to be the target and selectCreate Shortcut from the shortcut menu that appears (coincidentally also known as a pop-up menu). Note that you cannot create a shortcut to another shortcut. If you try, what you get is a shortcut to the target of the first shortcut— same effect as copying the first shortcut. Try creating a shortcut of your own, and then look at its properties.

File Names and Types

In the original DOS file system, also used in early versions of Windows, file names were limited to eight uppercase characters plus a three-character extension, separated by a "dot" (a period). (These are sometimes referred to as 8.3 style file names.) The extension specified the type of the file. For example, a shopping list stored as a plain text file might be called SHOPPING.TXT, while a resume created as a Microsoft Word document might be RESUME.DOC. Here is a list of extensions for common file types:

.txt

Plain text file

.doc

Microsoft Word document

.htm

HTML (Hypertext Markup Language) document

.xls

Microsoft Excel spreadsheet

.gif

GIF image (Graphic Interchange Format)

.jpg

JPEG image (Joint Photographic Experts Group)

.wav

Sound file

.exe

Executable file (binary machine code)

.com

MS-DOS executable ("command" file)

.drv

Driver (for a peripheral device)

.bat

Batch (script) file for the DOS command interpreter

Table 1 File extensions

In newer versions of Windows, file type information is automatically determined from the extension. If you double-click a file with the extension .doc, it will be opened by Microsoft Word, while a file with extension .htm will be opened by your browser (for example, Internet Explorer or Firefox). Newer versions of Windows may actually hide extensions from the user. For example, if you create a Word document called Wedding_Invitation, the actual file name will be Wedding_Invitation.doc, but the icon for the file will be labeled Wedding_Invitation. However, you can tell Windows to show you file extensions. From the View pull-down menu, select Options, go to the View tab, and clear the check box labeled Hide extensions for known file types. Now the icon will say Wedding_Invitation.doc.

If you try to open a file whose extension Windows does not recognize, Windows will display a dialog box listing a number of applications and allow you to choose which one to open the file with. Not all of these applications will actually work; it is up to you to choose an application that is appropriate. If you have no idea what is in a file, opening it with a simple text editor like Notepad will let you see if the file is human-readable.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]