What characters are forbidden in Windows and Linux directory names?

前端 未结 17 2866
北海茫月
北海茫月 2020-11-22 01:05

I know that / is illegal in Linux, and the following are illegal in Windows (I think) * . \" / \\ [

17条回答
  •  暖寄归人
    2020-11-22 01:46

    Though the only illegal Unix chars might be / and NULL, although some consideration for command line interpretation should be included.

    For example, while it might be legal to name a file 1>&2 or 2>&1 in Unix, file names such as this might be misinterpreted when used on a command line.

    Similarly it might be possible to name a file $PATH, but when trying to access it from the command line, the shell will translate $PATH to its variable value.

提交回复
热议问题