2.2 File Naming Rules

   

When you create a new file, there are some rules governing the naming of the file. These rules are related to the length of the file name and the characters allowed in naming a file.

General Guidelines for File Names

Generally a file name in UNIX can be as long as 256 characters. The rules that apply to the file names are as follows .

  1. A file name can be a combination of letters , numbers , and special characters.

  2. All letters, both upper- (AZ) and lowercase (az) can be used.

  3. Numbers from 0 to 9 can be used.

  4. Special characters like plus ( + ), minus ( - ), underscore ( _ ), or dot ( . ) can be used.

  5. As mentioned earlier, UNIX is case sensitive, and uppercase and lowercase letters are treated separately. So file names myfile , Myfile , MyFile , and myfilE are different names.

  6. There are no special names for executable files in UNIX; the file permissions show which file is executable and which is not.

Hidden Files

Any file that starts with a dot ( . ) is not displayed when using the ll or ls command. These are hidden or invisible files. Usually these files are used to store configuration information. If you remember the user startup file with the name .profile , it is a hidden file. To display the hidden files, use the ls -a command.

 $  ls -a  .profile  newfile   testfile.zip $ 

Hidden files are more protected against the rm command when used to delete all files in a directory. This command does not delete hidden files.


   
Top


HP Certified
HP Certified: HP-UX System Administration
ISBN: 0130183741
EAN: 2147483647
Year: 2000
Pages: 390
Authors: Rafeeq Rehman

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net