sh scripting question

Steve O'Hara-Smith steve at sohara.org
Fri Oct 16 11:23:17 UTC 2020


On Fri, 16 Oct 2020 15:55:59 +0530
Manish Jain <bourne.identity at hotmail.com> wrote:

> This is where I actually have an entirely different philosophy. When you 
> create a file with a leading - (or for that matter, weird characters 
> such as * anywhere in the filename), I think the filesystem driver (i.e. 
> the kernel) should throw a warning: "Do you really want a filename like 
> that ?"

	There is a POSIX standard for portable filenames but no requirement
to restrict users to it. By default the only characters not allowed in a
filename are / and NUL - which has the advantage of supporting filenames in
just about any encoding without problems (useful if you are serving files
for international workflows).

	BTW you have left out the fun and games available by use of
backspace and vertical tab in filenames - I have seen sysadmins lose half a
day trying to delete files like that (* is another favourite component in
sysadmin trap filenames).

-- 
Steve O'Hara-Smith <steve at sohara.org>


More information about the freebsd-questions mailing list