Previous PageNext Page

Appendix A - VINES File System Naming Rules

Name Spaces

If a file system object is created at a Macintosh, VFS follows the AppleTalk Filing Protocol (AFP) naming rules.
If a file system object is created from a Windows 95 or Windows NT client with a long file name, two names are associated with the file; a long file name and an auto-generated alias in MS-DOS standard 8.3 format.
If a file system object is created from any other file system, VFS follows the XOPEN naming rules.
If the above processes did not create a UNIX name, a UNIX name is created.

Naming Rules

Case Sensitive - A case sensitive file system recognizes the difference between upper- and lower-case letters and therefore treats filenames that are identical - except for case - as different files. For example, UNIX treats book, BOOK, and Book as three different files. UNIX also preserves the case that you enter.

Case Insensitive - Case insensitive means that a file system does not recognize a difference between upper- and lower-case letters and therefore does not perceive a name typed in all lower-case letters, as being different from the same name typed in all upper-case or mixed-case letters. For example, case insensitive file systems would see BOOK, Book, and book as the same file.

DOS FAT lets you enter upper- or lower-case letters; however, DOS converts any lower-case letters you enter into upper-case letters. In other words, DOS does not preserve the case that you enter. For example, if you enter book, DOS displays the name as BOOK.
Windows 95, Windows NT, and Macintosh let you enter filenames using upper- and lower-case letters, and do preserve the case that you use. For example, if you enter Book, these clients display the filename as Book.

Table A-1. File Naming Rules

Creating Filenames

Table A-2. Filename Creation

VFAT and NTFS Rules

If the name is 31 characters or less, the Macintosh view is the same as the LFN view. Otherwise, the Macintosh view is the same as the DOS view.
If the name does not meet the DOS 8.3 format, remove any characters that are invalid in the DOS view and replace them with an underscore ( _ ). Also, remove all spaces and all periods except the last one.
Truncate the string before the period, if there is one, to six characters and append to that the string ~1. Truncate the string after the period to three characters.
If the resulting generated name duplicates an existing name, increment the ~1 string.

Example 1 - File Name Created from LFN Client

 LFN client, Macintosh  Long File Name.Txt
 DOS, Windows 3.x, OS/2  LONGFI~1.TXT
 UNIX  longfi!1.txt

 LFN client  Long File Name with more than 31 bytes.Txt
 Macintosh  LongFi~2.Txt
 DOS, Windows 3.x, OS/2  LONGFI~2.TXT
 UNIX  longfi~2.txt

Copying Files with Long File Names from Different File Systems

 LFN client, Macintosh  Long File Name.Txt
 DOS Windows 3.x, OS/2  !LONG_FI.LE_
 UNIX !long_fi.le_

AFP Rules

If the Macintosh name is a valid short name (that is, 8.3 DOS), then the long (Macintosh) name and the short (DOS) name will be the same.
If the name given a file at a Macintosh is not a valid short name (too many or invalid characters) and does not match any existing long name, a short name is created from the Macintosh name.

If the Macintosh name is too long, it will be truncated. Most characters that are invalid in DOS will be dropped, but some may be mapped to valid characters. The details of the truncation and mapping are not spelled out in the AFP specification, and may differ between implementations. Furthermore, truncation and mapping may also depend on filenames that already exist.

Example 2 - File Name Created from Macintosh Client

 LFN client, Macintosh Long File Name.Txt
 DOS Windows 3.x, OS/2 !LONG_FI.LE_
UNIX  !long_fi.le_

Macintosh  Long\File Name.Txt
 LFN client !LongFil.e_N
 DOS, Windows 3.x, OS/2 !LONGFIL.E_N
UNIX  !longfil.e_n

XOPEN Rules

Example 3 - File Name Created from DOS, Windows 3.x, or OS/2 Clients

VFS Rules

1. If you can see a file and you have the proper access rights, you can rename that file. If you change a filename under one file system, the filename automatically changes under all file systems.

2. If a Macintosh name is created because some other file system user created a file, it does not cause a DOS name to be created using AFP rules. A DOS name is created from a Macintosh name only when a Macintosh user creates the file.

3. File creation can fail due to a collision in another name space. For example, suppose a Macintosh user creates 12345678901234. A short name such as 12345678.901 is created, and that name is assigned to DOS and UNIX. (This is done even though UNIX could use the original name.)

The Macintosh user cannot now create a file 12345678.901 for two reasons:

- Because this name is valid in the short name space, it must be used there.

- The name already exists in the short (DOS) name space.

UNIX cannot create a file 12345678901234, because that name must appear in the Macintosh space, and it already appears there.

4. Two different files can have the same name in two different name spaces, except for Macintosh and DOS. AFP specifically says that if a name appears in both the short (in VFS, DOS) and long (in VFS, Macintosh) name spaces, then it must name the same file. For instance, UNIX can create BOOK, which will not appear in DOS. DOS can then create BOOK, which will appear in UNIX as book. The two files named BOOK are different.

Be sure you understand the difference between rules 3 and 4.

UNIX Links

Previous PageTop Of PageNext Page