@ShamblerR

Откуда второй слеш //?

сегодня нечаянно ввел два слеша получил необычный результат
root@xxx / # 
cd //
root@xxx // # 
три слеша дает более обычный результат
 cd ///
root@xxx / #
Вопрос 
1. почему два слеша система считает нормальной
2. Где сделал  редирект с большего количества слешей на 1 ?
  • Вопрос задан
  • 972 просмотра
Решения вопроса 1
@tplus
POSIX.2, in its description of 'cd', says that three or more leading slashes may be replaced with a single slash when canonicalizing the current working directory.

This is, I presume, for historical compatibility. Certain versions of Unix, and early network file systems, used paths of the form //hostname/path to access 'path' on server 'hostname'.

A pathname that begins with two successive slashes may be interpreted in an implementation-defined manner, although more than two leading slashes shall be treated as a single slash.


stackoverflow.com/questions/20690828/what-does-dou...
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы