Having encountered an incomprehensible phrase, the reader, as a rule, seeks to find out its meaning. This article is a short tour for the user around the world of the unknown.
General file concept
Long-term (external) computer memory stores all data in the form of files. What is it? A file is a named sequence of bytes, which in turn consists of bits. He has his own name and address of accommodation. The first parameter is indicated by the person, and the second is set and the operating system remembers for a long time. The search is performed by the file name, therefore, the user does not need to write its address.
It so happens that information cannot be found on a computer storage medium. But even an empty file has its own name, which is an important property of the data set recorded on the hard disk. If it is absent, then such a structure cannot be called storage.
File system
Each storage medium (flexible, hard or laser disk) can contain a huge amount of it. The file system is designed to store data and organize various directories. In a broad sense, it consists of the totality of all the information on the disk, sets of data structures, a set of system software. The root directory consists of Level 2 attachments, which, in turn, include folders of the 3rd, etc. A single-level linear system is used for disks with several files, a multi-level hierarchical system for disks with a large number of them. The second inherent tree structure.
File system assignment
It consists in providing a convenient interface for a person when accessing information on a disk, and in realizing the possibility of sharing objects with many people and ongoing processes. Such a structure device allows you to achieve maximum results when working with data.
File types
Thanks to certain information, the computer can approximately “understand” what is in the data set and with what program it can be opened. An extension is a few letters or numbers after a period in a standard file name. It defines the data type and the corresponding program. For example, information recorded on a disc with the extension mp3 will open in the player. A picture of the program is present in the image of the file. From this icon, an experienced user immediately understands where you can apply the specified data type. The document will open only in a program designed for text. Video files can be scrolled in the player. Information in the form of pictures is opened in a graphical editor. There are many different files. Each of them has an icon indicating the corresponding program.
File: file names
Users give symbolic names to the data set on the disk. Files are identified by them. At the same time, the system’s limitations on both the characters used and the entire length of the phrase are necessarily taken into account. A file name is the name above, which may be the same across multiple datasets. In this case, the sequence of directory identifiers will be different, that is, the address where the information is located. In some systems, the same object cannot have several names, in others there is no such restriction at all. In the latter case, the dataset is provided with a unique name. This is a numeric identifier used by any operating system programs.
File Name Composition
Any information on the disk contains several elements. What does the file name consist of? In order to understand this, it is necessary to have a sample before your eyes. A file name consists of two interconnected parts: a name and an extension that defines the data type. It identifies any information on the medium.
Full name
You can give an example:
C: \ Music \ Holiday \ Melody.mp3 .
The full file name specified in the sample is the name consisting of the file itself and the information path. The last of these items is a list of folder identifiers that must be opened sequentially to get from the highest level to the data set. The full file name must be specified, starting from the root directory, and contains a list of all the dependent attachments of the remaining levels. This name is absolute. It refers to information regarding the root directory, regardless of the current folder. All name elements are separated by a slash (\). This character must be placed before the name of the root directory.
Short name
Limitations of the MS-DOS operating system caused this term. In those days, a file could only have 8 characters in a name. A little later, it became possible to put an end to the name and add 3 extension characters.
It looked like this:
Melody.mp3 .
Developers began to use name extensions for technical needs. With their help, the program "learned" to recognize the type of file. This file name recording scheme was called 8.3 system (by the number of characters of the name and extension, and the dot between them). It had a number of drawbacks: the inability to use a space, punctuation marks, letters other than the English alphabet. Therefore, creating a meaningful name was very difficult. The short name does not contain a slash ( \ ). By this name, you can refer to the data of the current directory.
Long name
Previously, when thousands of files were stored on disks, users knew pretty well where all the data came from on the media. It is currently not possible to follow the history of incoming information. Therefore, strict restrictions on the length of the name were removed for the data. What does the file name consist of? Now the name can be written in Russian letters, with some punctuation marks and even spaces. An extension is indicated not only by three characters. If the name contains several periods, the file type is indicated after the last punctuation mark.
However, traditions contain great power, so long extensions are not found on computers. Three characters to indicate the type of file, the system is enough. The longest name can have at least 250 characters, although this certainly seems to be overkill.
Problem objects
A document with a long title may not be read correctly on another computer. Therefore, when transferring data, rename the file using Latin letters. The Russian alphabet may not appear on the recipient's computer, and instead of phrases an incomprehensible set of characters will appear. Any letters are used to organize the file storage system on the user's personal computer.
The correct file name
It can consist of any letters in upper and lower case, numbers, periods and underscores. The use of a space is not prohibited. However, do not abuse it, as well as put in the beginning of the name. Other characters can be included in the name, except for reserved characters (> <|? * / \: "). The extension is separated from the name by the last right dot. The name is limited to 255 characters. In fact, an ordinary user has 20 characters. The operating system does not distinguish lowercase and uppercase letters in the file name. This means that saving two elements with the same name written in a different register in the same directory will not work. This may look like an example of matching names: "Text.doc" and "TEXT.doc".
Invalid file name
In addition to these restrictions, there is a prohibition on the use of reserved device names.
So, PRN is a printer. COM1-COM4 - devices connected to serial ports 1-4. AUX performs the same function as COM1. LPT1-LPT4 are elements connected to parallel ports 1-4 (printers), CON (consol) when input is entered by the keyboard, when output is displayed by the screen, NUL is the “empty” device. When a user tries to specify a reserved name, the system gives an error. A warning is also displayed when prohibited characters are used. It indicates an invalid file name. Incorrectly recorded information about the data set is not saved, but takes the previous value.
File name template
Command shells of operating systems, as well as various programming languages allow the user to search for specific groups in names and directories. All files are checked for compliance with a given template, if any of them matches the standard, then it is taken into account, if not, then it is skipped.
Why is such a sample needed? Often, the same action is required with a whole group of files. This takes less time than accessing each document individually. The file name template allows you to select a group that meets the specified requirements from the total mass. It is used even when searching for data.
Special characters
The file name template is specified using special characters:
- An asterisk is a designation of any group of characters. Their number does not matter. For example, one asterisk is a template that corresponds to all the information in the catalog. Thanks to the * .mp3 command, you can change any file of the same type. File names starting with my and ending with .txt are highlighted using the my * .txt template. Sample * 2014 * defines all objects on the computer whose names contain the 2014 character group.
- A question mark is a designation for any single character. For example, under the sample music. ??? data starting with the specified word that have an extension of three English letters will do. In the template na? E.txt, there can be any character instead of the standard question mark.
Other teams
Other sample design rules are also provided. By including square brackets ([]) in the command with a list of possible values, you can make the search more flexible. If you want to find any files starting with the letter t, not case sensitive, then the template should be written like this: [tT] *. When searching for data with alphabetical names, you can create a range. A similar pattern looks like this: [k-zK-Z] ?. jpg. The system will find files with the specified extension type, whose names consist of two characters. Moreover, the first letter k, l, y or z is case insensitive.
Shell value
In one sample, several special characters can be used. Templates are combined with many commands: viewing directories, copying files, searching, etc. However, actions are not carried out with the sample, but with the data that fit under it. The necessary objects are selected by the shell.
Template expansion is the process of replacing the * character with a slender sequence of file names.
Individual teams can never find a special character in the list of their parameters. So what is responsible for finding data? The command shell makes the necessary extension of the template in such a way that all file names matching the sample are listed.
File name masks
They are used in group operations with data. A mask is a sequence of characters allowed in file names, which may also include a question mark and an asterisk. With its help, you can delete any temporary file on your computer. File names in a command can contain various notations. The question mark is the mark of one arbitrary character, and the asterisk is the whole sequence. For example, using the rm * mp3 command, you can delete all files ending in this fragment. If you want to erase all the data in the directory, you should specify the rm * command. The command with a question mark works almost the same way , one character changes. Name masks can also be used with directories.
Problem copying
The transition to long names gives rise to compatibility problems with previously created programs that use small phrases. In order for applications to open information in accordance with the previously accepted storage structure, the file system must be able to provide unique short aliases to data with complex names. Newer operating systems support long names. But sometimes the user is faced with unexpected problems. Copying files with long names can cause some difficulties.
In this case, even creating a shortcut will not help. Usually, the user only needs to rename the file and try again. Alternatively, you can archive data, copy and unzip. But what if in the hundredth subdirectory in which the required file is located, the file names are so long because of the path specified in them?
Spare Options
If the above methods do not work, you just need to connect the network drive by right-clicking on the computer image and selecting a connection in the menu that appears. In this case, you must specify the letter for the desired medium and the file path.
In extreme cases, the user can use the program to copy long FAR 2.0 names and even disable Recycle Bin.