Днешната сесия за въпроси и отговори ни идва с любезното съдействие на SuperUser - подразделение на Stack Exchange - обединяване на уеб сайтове с въпроси и отговори.
Въпроса
Четецът на SuperUser Luu Vinh Phuc иска да знае защо dir *. * Изброява всички файлове и папки:
When I run the dir *.* command, it produces unexpected results. Even files and folders without any dot in the name are listed. For example:
Защо списъкът *. * Показва всички файлове и папки?
Отговорът
Командирът на флота командир на SuperUser има отговорът за нас:
The DIR command comes from a time when:
- A period (.) was not allowed as a character in file or folder names
- File and folder names were restricted to 8 characters for names and 3 characters for extensions
Therefore, by that standard, *.* meant whatever the name and whatever the extension. It did not mean a string containing a “.”, which may or may not have characters before or after the “.”.
Microsoft’s policy is preserving backward compatibility, so that interpretation of *.* is retained. But in Windows PowerShell, *.* means a string containing a “.”, which may or may not have characters before or after the “.”.
Имате ли нещо, което да добавите към обяснението? Звучи в коментарите. Искате ли да прочетете повече отговори от други потребители на Stack Exchange? Вижте цялата тема на дискусията тук.