linux/unix和windows的路径名中,不能出现的字符是不是通用的?
linux/unix和windows的路径名中,不能出现的字符是不是通用的?
比如windows下面不能有\ / : * ? < > |
那么linux有什么限制呢?
想把字符串中的这些不能出现的字符剔除掉,完后创建文件夹路径什么的。求指导
[解决办法]
你别管不能出现什么, 只管可以出现什么就行了.
英文字母, 数字, 空格, 下划线.
[解决办法]
有道理,使用not in来做过滤。
[解决办法]
The names in a directory are called filenames. The only two characters that cannot appear in a filename are the slash character (/) and the null character.