File names

The name of a file can be any sequence of characters and numbers including even special symbols like .,-,_ etc. and blank space. The top level directory of the file system is called the root directory, and it is represented by a single slash (/). The path to a file is the sequence of directory names starting from the root, and going through various sub-directories to the file. The complete name for any file is given by the path from the root to that file, written from left to right. The complete path to a file is referred to as the absolute pathname.

To specify the absolute pathname, start with a single slash for the root. Then append the names of all directory nodes from the root to the desired file, adding another slash after each directory name. Finally, append the file name itself. For example, the absolute pathname of the file testfile, which is a child of directory myDir, which is a child of the directory anotherDir, which is a child of the root directory is: /anotherDir/myDir/testfile.

You can also refer to a file by its relative pathname by giving the path from your current position in the tree to the place where the file is. You go up one level in the tree by entering :
cd ..
For example, if you are currently in the directory myDir and you want to find a file testfile1 in the directory yourDir, which is also a child of directory anotherDir, then the relative filename is: ../yourDir/testfile1