Contacts

Test-off on computer science "File and File System" Fragment. Test on the "Files and File System" topics 8 The path to the file shows

The file is a named memory area on an external media containing information. File name consists of 2 parts: own name and expansion, separated by a point. Your own name is set by the user and may contain 255 characters. The composition of these characters may include letters, numbers, special characters except. because shares its own name and expansion; ? can replace one any character; * Replaces any number of characters, / \\ direct and reverse slash, shares the attached folders. The extension usually sets the program in which the file was created. Such an extension contains 3 letters, but the user can set the extension itself. For files distinguish the full name (path). The full name shows all the directory levels in which the file is located. The full file name begins with a disk name on which the file is saved.

3. What is the decimal value of the binary number 10012? How many times does the meaning of this number change, if you can attribute one zero to it, two zero, three zero?

1001 \u003d 1x2 0 + 0x2 1 + 0x2 2 + 1x2 3 \u003d 9

10010 \u003d 0x2 0 + 1x2 1 + 0x2 2 + 0x2 3 + 1x2 4 \u003d 18

Ticket №28.

1. Organization of the file structure. Concepts of the sector, tracks, cylinders, cluster, FAT - tables.

The concept of the cylinder. All modern disk operating systems provide the creation of a file system designed to store data on disks and access access. The principle of organization of the file system depends on the operating system. The most common type is tabular. First, the disk seems like a set of surfaces. Flexible disks are only two (upper and lower), but hard drives are actually "shells" consisting of several plates, so they have more surfaces. Secondly, each disc surface is divided into annular tracks, and each track is on the sectors. Sizes of sectors are fixed and equal to 512 bytes. To find one or another file on the disk, you need to know where it is located, that is, you need his address. The easiest way would be to record the address of the file in the form of the surface number, the number of the track and the sector number, but in fact it is done not quite so. The fact is that each surface has its own head to read the record, and these heads are moved not to apologize, but at the same time. That is, if, for example, the fifth head is supplied to the thirtieth path, then all the heads are summarized to their thirtieth paths. Therefore, instead of the concept of the track, the concept of the cylinder is used. The cylinder is a totality of all tracks that have the same numbers, that is, equidistant from the axis of rotation. Therefore, the location of the file on the hard disk is determined by the cylinder number, surface number and sector number. The concept of cluster. The sector is the smallest data storage unit, but it is not used to address all file systems. For this she is too small. Operating systems such as MS-DOS and Windows are used to address a larger storage unit called cluster. The cluster is a group of neighboring sectors. The cluster size depends on the size of the hard disk. The greater the disk, the greater the cluster size is assigned. Typical values: 8,16,32 or 64 sectors. The data on which a file cluster begins a particular file, is stored in the disk system area in special file placement tables (FAT tables). Since the violation of the FAR table leads to the impossibility of using the data recorded on the disk, it is subject to special requirements for reliability, and it exists in two copies, the identity of which is regularly controlled by the tools of the operating system. Some operating systems implement 16-bit fields in file location tables. Such a file system is called FAT 16. It allows you to place in FAT tables no more than 65,536 entries (2 16) on the location of the data. Because of this limit, these operating systems do not allow working with hard disks of more than 2 GB. Currently, Windows operating systems provide a more advanced file system - FAT 32 with 32-bit fields in the file placement table. This allows you to work with any modern hard drives.

These signs are used to separate the names of the directories that make up the path to the file.

For example, in the next addressing recording /home/user_kolia/foo/bar.txt part BAR.TXT is the name of the file, and / home / user_kolia / foo / - the path to it.

The path can be absolute or relative. Full or absolute Path - This is the path that indicates the same place in the file system, regardless of the current working directory or other circumstances. The full path always starts with the root catalog. Relative The path is the path in relation to the current working directory of the user or active applications.

To effectively search for files Unix-like operating systems tend to have a system variable $ PATH in the command shell (for example, SH), which sets redirects to the most important executable files. You can find out the value of this variable using the ECHO $ \u200b\u200bPATH command or similar.

Presentations of the path by operating system and shell

Operating system Shell Root directory Directory separator Parental catalog Examples
Unix-like OS Command Sheath Unix. / / .. /home/user/docs/letter.txt.
DOS. Command.com. [Disc Letter:]\\ or
\\[Server Name]\
/ or \\ (Note: Command.com Does not. Treat / AS A Directory Separator) .. C: \\ user \\ docs \\ letter.txt
A: Picture.jpg.
\\\\ Server01 \\ User \\ Docs \\ Letter.txt
OS / 2. cmd.exe. [Disc Letter:]\ / or \\ .. C: \\ user \\ docs \\ letter.txt

The name corresponding to the Universal Names Assignment Agreement, the full name of the resource on the network, including the server name and the name of the share of the resource (printer, directory or file); For catalogs or files may also include a relative path.

Syntax UNC- Put to the printer Next: \\\\ server \\ NEW-PRERTER, where the server is the network name of the computer, the network sub-prorter is the network name of the shared printer on this computer.

Syntax UNC- To the directory or file is as follows: \\\\ server \\ Nethequetalog [\\ relative), where the server is the network name of the computer, the network code is a network name of the common directory on this computer, and relative paramele is the path to the directory or file from the common catalog.

The network-type is not necessarily called the same as the directory associated with it on the server, the name is given during the opening of the shared directory in the computer file system.

In versions Windowspreceding Windows XP., Only API.-Sellis using LONG UNC.Could use paths longer than 260 characters.

Total B. Microsoft Windows. The following types of paths are used:

  • LFS. (eng. local File System) - Names in the local file system, for example: C: \\ Folder \\ File.
  • UNC - Network names, for example: \\\\ Server \\ Sharedfolder \\ Folder \\ File.
  • LONG UNC. or UNCW. - Long names, for example: \\\\? \\ UNC \\ Server \\ Sharedfolder \\ Folder \\ File or \\\\? \\ C: \\ Folder \\ File.

Literature

Mitch Tulloch, Ingrid Tulloch Microsoft Encyclopedia of Networking, Second Edition. - ISBN 0-7356-1378-8

Notes


Wikimedia Foundation. 2010.

  • War path
  • The path to Christ.

Watch what is "path to the file" in other dictionaries:

    Autorun.inf. - autorun.inf The file used to automatically start or install applications and programs on media information in the Microsoft Windows operating system (starting with the version of Windows 95). This file must be in the root ... ... Wikipedia

    File name - Displays the contents of the C: / Temp directory of the names in it on the DIR command in the Windows command, the name of the file name of the symbol, uniquely defining the file in some namespace ... Wikipedia

    Encfs. - Type File System, Encryption Developer Valient Gough Operating System Linux, FreeBSD, Mac OS Latest Version 1.7.4 (September 5, 2010) License G ... Wikipedia

    SSI (Programming) - This term has other values, see SSI. SSI (Server Side Includes on the server side) is a simple language for the dynamic "assembly" of web pages on the server from individual components and issuing a customer obtained by HTML ... ... Wikipedia

    SERVER SIDE INCLUDE (Programming)

    Server Side Include. - SSI (Server Side Includes on the server side) A simple language for the dynamic "assembly" of web pages on a server from individual components and issuing a client of the received Apache web server using the MOD INCLUDE module. Included in ... ... Wikipedia


Now imagine that you need to find a specific document. To do this, you need to know the box in which it is located, as well as the "path" to the document inside the box: the entire sequence of folders you want to open to get to the desired papers.

The second coordinate defining the location of the file is the path to the file on the disk. The path to the file is a sequence consisting of directory names, ranging from the root and ending in which the file is directly stored.

That's all familiar to the fabulous analogy of the concept of "path to the file": "The cheeter hangs on the dub, in the cheese trunk, in the hare - the duck, in the duck-egg, in the egg - the needle, at the end of which the death of Koschev."

Consistently recorded logic disk name, the file path and file name constitute the full name of the file.

If presented in Fig. 2.1 The file structure is stored on a disk with:, then the full names of some files included in it in the symbols of MS-DOS operating systems and Windows look like this:

C: \\ Ivanov \\ Progs \\ Progl.pas

C: \\ Petrov \\ Data \\ Task.dat

5. File Placement Table

Information about the file structure of the disk is contained on the same disk as a file posting table. Using the OS file system, the user can sequentially view the contents of directories (folders) on the screen, moving around the file structure down or up.

In fig. 4.1 shows an example of displaying on the screen of a catalog tree on a logical disk E: (left window).

The right window contains the contents of the Arcon folder. ") Many files of various types. From here, for example, it is clear that the full name of the first file in the file is as follows:

E: \\ Game \\ Games \\ Arcon \\ dos4gw.exe

From the table, you can get more information about files. For example, the DOS4GW.exe file has a size of 254,556 bytes and was created on May 31, 1994 at 2 hours 00 min.

Having found in this list the record of the desired file, using the OS commands, the user can perform various actions with it: initialize the program contained in the file; Delete, rename, copy the file. You will learn all these operations in a practical lesson.

Fig. 4.1 Tree catalogs

  1. Types of files

Executable files (programs).

Configuration files containing the parameters required for the program.

Library files containing descriptions of typical procedures that can be used immediately by several programs.

Documents - i.e., some combination of information created by the user (or computer) using programs.

Ordinary files Really represent a set of blocks on the external memory device on which the file system is supported. Such files may contain both text information and binary information. The file system does not prescribe the usual files any structure, providing at the user-level representation of a regular file as a sequence of bytes.

The presence of ordinary files is not enough to organize hierarchical file systems. Requires directories that compare file names or directories with their physical description. Directories are a special type of files that are stored in external memory like regular files, but the structure of which is supported by the File System itself. File-catalogs The special type of file corresponds to which only a special set of system calls and commands is possible.

Special files Do not store data. They provide a mechanism for displaying physical external devices in the file system names. Each device supported by the system corresponds to at least one special file. When reading or writing to a special file is performed, a direct call is made of the corresponding driver, the program code of which is responsible for transmitting data between the user process and the corresponding physical device.

As a rule, the user directly works only with two types of files: programs and documents. The first are used to create the second. Although today will very rarely meet the program that would fit in the same file. That is why they say today about software packages - i.e. sets of various types of files, together forming the program.

There are three main types of files:

The system recognizes only the files of these types. However, many derivative file types also apply in the operating system.

Files whose name starts from the point are called hidden files or "dot" files. You can see such files using a graphic file manager, such as Nautilusand from the shell command line. IN Nautilus Choose Edit)Parameters (Preferences). In the window that appears in the tab VIEW Choose Show hidden files (showhiddenfiles). In the command prompt, use to view the contents of the LS -AL directory. Looking through hidden files in your home directory, you can be surprised by their quantity. These hidden files are usually configuration files of applications. They are hiding to prevent their random change and not clutter the home directory view window.

File types:

Batchfile (batch file) is the same as the command file. With operating system commands

BinaryFile (binary file) - contains data or commands in binary form

CommandFile (command file) - contains operating system commands

DataFile - contains data

DirectoryFile (directory file) - contains information about files located in the directory

ExecutableFile (executable file) - contains a program or commands in executable format

LibraryFile (library file) - contains functions in object format

MapFile (Card file) - contains a program map

ObjectFile (object file) - contains program code (functions) after compilation

TextFile (text file) - contains text (which can be read); it may

there is a file that is created by text editor or any file in ASCII format.

File access path:

The file system is built from ordinary files, symbolic connections and reference books. These components provide a way to organize, search and manage information.

Ordinary files are a set of characters stored on the disk. They can store texts or programs or program codes.

Special files correspond to physical devices (for example, terminal or disk).

Symbolic communication is a file that points to another file.

The directory contains the names of other reference books (called aspira) or files. All reference books and files are organized in three separate structures. In this hierarchy, files and reference books that have submission are called a relationship.


This type of relationship is possible for many levels of the file hierarchy and reference books.

Full file name:

Full file name (The full path to the file) in Windows systems consists of a drive letter, after which the colon is made and the inclined feature (reverse slash), then subdirectories are listed through the inverse stakes, the file name is written at the end. The string is completed with the NULL symbol. Example:

C: \\ Windows \\ System32 \\ Calc.exe

in * NIX systems, the full path consists of a slash (/), denoting the root directory, after which the subdirectories are listed through the track, the file name is written at the end. Example:

USR / LOCAL / BIN / GCC

The file name consists of two parts, separated by the point:

The name (to the point is often also called the name);

Expansion (optional).

The full name of the file (including extension) in Windows may contain up to 260 characters, the value is determined by the MAX_PATH constant in Windows API; For example, the maximum allowable full file name on the C disk will be the way "C: \\<256 символов>NULL. " However, the Unicode of the version of some functions allow you to use file names containing up to 32000 characters, such names begin with the prefix "\\\\? \\". Example:

\\\\? \\ C: \\ Windows \\ System32 \\ Calc.exe

When using the prefix "\\\\? \\", You must specify the absolute path to the file, the relative paths are not allowed. When using relative paths, the maximum full file name is limited to MAX_PATH constant (260 characters).

In Windows, the name of the file is prohibited in the file name: "\\", "/", ":", "*", "?", "" ","<», «>"," | ". In Linux, these characters except "/" are permissible, although they should be used with caution, as some of them may have a special meaning, as well as for considerations of compatibility with other OS.

The name of the file (to the point) should be given a meaningful, speaking of the destination file, in order to avoid confusion in the future.

File managers.

File manager (eng. fileManager.) - a computer program that provides the user interface to work with the file system and files. File Manager allows you to perform the most frequent file operations - creating, opening / playing / viewing, editing, moving, renaming, copying, deleting, changing attributes and properties, search files and assignment rights. In addition to basic functions, many file managers include a number of additional features, such as working with a network (via FTP, NFS, etc.), backup, printer management, etc.

Allocate different types of file managers, for example:

Navigation and spatial - sometimes the switch between these modes is maintained.

Double - in general, have two equivalent panels for a list of files, directory wood, etc.

Route (path) to the file. Full file name. File attributes (in a broad sense).

To unambiguously determine the address of the file on the computer, you need to know:

The path to the folder where the file is located (analogue of the address of the person's apartment);

The file name in this folder (analogue of the person's full name).

The file name is necessary in order for it (by name) to file a disk file. In one folder there can be no two files with the same names, in different folders it is permissible.

Full file name (The full path to the file) in Windows systems consists of a drive letter, after which the colon is made and the inclined feature (reverse slash), then subdirectories are listed through the inverse stakes, the file name is written at the end. The string is completed with the NULL symbol. Example:

C: WindowsSystem32Calc. EXE

in * NIX systems, the full path consists of a slash (/), denoting the root directory, after which the subdirectories are listed through the track, the file name is written at the end. Example:

USR / LOCAL / BIN / GCC

The file name consists of two parts, separated by the point:

The name (to the point is often also called the name);

Expansion (optional).

The full name of the file (including extension) in Windows may contain up to 260 characters, the value is determined by the MAX_PATH constant in Windows API; For example, the maximum allowable full file name on the C disk will be the way "C:<256 символов>NULL. " However, the Unicode of the version of some functions allow you to use file names containing up to 32000 characters, such names begin with the prefix "?". Example:

C: WindowsSystem32Calc. EXE

When using the prefix "?" You must specify the absolute path to the file, the relative paths are not allowed. When using relative paths, the maximum full file name is limited to MAX_PATH constant (260 characters).

The file name is prohibited from the use of some service characters: "", "/", ":" (only in Windows - in Linux this character in the name is allowed), "*", "?", "", "<», «>», «|».

The name of the file (to the point) should be given a meaningful, speaking of the destination file, in order to avoid confusion in the future.

File extension

File extension Maybe there is no absent or to be any length (within the length of the file name). The extension defines the type (format) of the file, that is, by expansion, the user and OS define the data type stored in the file. For example, in Windows, files with expansion bMP- uncompressed images, jpg.- Compressed images.

Everything files On the computer can be divided into:

programs (executable files);

documentation.

Only programs are able to "do": to create (documents), view (documents) to change (Documents). The document is the result of the program stored on the disk. Documents do not know anything, it's just data on the disk. To view or change the document, it is necessary that a program can be installed that can work with this type of document. If this program is not installed, the OS will not be able to open the file.

For example, Windows uses extensions in Windows eXE and com.. Files with other extensions can be considered documents.



Did you like the article? Share it