Unix 文件名中应该限制哪些字符? [英] What characters should be restricted from a Unix file name?

查看:28
本文介绍了Unix 文件名中应该限制哪些字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑一个带有自由文本条目的另存为对话框,用户在其中输入文件名作为自由文本,然后单击保存按钮.然后软件会验证文件名,如果名称有效则保存文件.

Consider a Save As dialog with a free text entry where the user enters a file name as free text, then clicks a Save button. The software then validates the file name, and saves the file if the name is valid.

在 Unix 文件系统上,应在验证中应用哪些规则,例如:

On a Unix file system, what rules should be applied in the validation such that:

  • 在转义特殊字符等方面,名称稍后将不难操作.
  • 这些规则并没有限制到保存文件变得对用户不友好的程度.

那么基本上,应该限制在 Unix 文件名中的最小字符集是什么?

So basically, what is the minimum set of characters that should be restricted from a Unix file name?

推荐答案

最小值是斜杠 ('/') 和 NULL ('')

The minimum are slash ('/') and NULL ('')

这篇关于Unix 文件名中应该限制哪些字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆