|
|
The maximum permitted length of a file or directory name is 255 characters. In fact, this is controlled by the value of the {NAME_MAX} constant; to check the value of this, use the getconf(C) command, as follows:
$ getconf NAME_MAX . 255Pathnames, which are described in ``How directories are organized'', have a maximum permitted length of 1024 characters (as controlled by {PATH_MAX}, which is also controllable using getconf).
An important consideration, where Open Systems are an issue, is filename portability. Many of the international standards specify a character set that should be used for the construction of portable filenames. The IEEE POSIX standard, for example, specifies the following Portable Filename Character Set:
The slash character (/) signifies both the root directory and the pathname element separator, and is valid only in these contexts. See ``How directories are organized'' for more information on pathnames.
Filenames may begin with a dot (.), but this has the effect of excluding them from normal directory listings. See ``Listing the contents of a directory'' for details of how to list these ``hidden'' files.