Naming a file in Unix
When you save a paper, spreadsheet, picture or mail message, your work
is stored as a file. There are rules for the
ways you can name files. You can use letters, numerals, periods and the
underscore (_), but do not use other punctuation marks
such as question marks, slashes, exclamation points or dollar signs. Unix
reserves these and a few other symbols for special system functions.
Unix is also case-sensitive, so you might want to stick to using lowercase
letters to cut down on possible confusion and to make file names easier
to type. Here are some examples of file names:
biology_homework_3 peter_reply.txt
testdata resume
chem.doc my3paper_blake
File names are case-sensitive, which means that a file named "testdata" is
not the same as one named "TestData" or one named "TESTDATA." Unix file
names can be up to 256 characters in length, but you should use only enough
to clearly and easily identify the file and its contents.
Be careful when using a period (dot) in your file name to create an extension,
since periods and the extension following often have special meanings in
Unix. For example, a file ending in ".c" would indicate to Unix a program
written in the C programming language. Underscores often are good characters
to use in long files name to separate different parts of the name.
NOTE: If you are a DOS user, you will notice that you
are no longer restricted to file names with eight or fewer characters followed
by an optional period and three characters. If you want to copy files from
your Unity account to your DOS machine without having to rename them,
you might want to use the DOS naming conventions, since
most DOS file names are acceptable Unix names.
Last modified
October 19, 2005
cawalker
|