Filenames

The original QNX 4 filesystem supported filenames no more than 48 characters long. In QNX Neutrino 6.2.1 and later, this limit has increased to 505 characters via a backwards-compatible extension that's enabled by default. The same on-disk format is retained; new systems see the longer name, but old ones see a truncated 48-character name.

Long filenames are supported by default when you create a QNX 4 filesystem; to disable them, specify the -N option to dinit. To add long-filename support to an existing QNX 4 filesystem, log in as root and create an empty, read-only file named .longfilenames, owned by root in the root directory of the filesystem:

cd root_dir
touch .longfilenames
chmod a=r .longfilenames
chown root:root .longfilenames
Note: After creating the .longfilenames file, you must restart the filesystem for it to enable long filenames.

You can determine the maximum filename length that a filesystem supports by using the getconf utility:

getconf _PC_NAME_MAX root_dir

where root_dir is the root directory of the filesystem.

You can't use the characters 0x00-0x1F, 0x7F, and 0xFF in filenames. In addition, / (0x2F) is the pathname separator, and can't be in a filename component. You can use spaces, but you have to "quote" them on the command line; you also have to quote any wildcard characters that the shell supports. For more information, see "Quoting special characters" in Using the Command Line.