有没有无效的Linux文件名? [英] Are there any invalid linux filenames?
本文介绍了有没有无效的Linux文件名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我想创建一个保证不能表示文件名的字符串,我可以在Windows中添加下列其中一个字符:
\ /:*? | < >
this-is-a-filename.png
?this-is-not.png
有什么办法可以在Linux上将字符串识别为不可能是文件?
解决方案
除了 If I wanted to create a string which is guaranteed not to represent a filename, I could put one of the following characters in it on Windows: e.g. Is there any way to identify a string as 'not possibly a file' on Linux? There are almost no restrictions - apart from 这篇关于有没有无效的Linux文件名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!'/'
和'\0'
之外,几乎没有任何限制,您可以使用任何东西然而,有些人认为这不是个好主意非常灵活。 \ / : * ? | < >
this-is-a-filename.png
?this-is-not.png
解决方案 '/'
and '\0'
, you're allowed to use anything. However, some people think it's not a good idea to allow this much flexibility.
查看全文