Filenames and pathnames As we mentioned, each file and sub-directory has its own name. This name may be up to 31 characters long and may not contain any characters. This is the filename . A filename isa string ofcharacterswhich doesnotcontain any directory specifications, such as ‘ ssasm.xrel A pathname includes a directory specification, such as " /rd/myfile ", " bin/edit.xrel " and " ../test ". A pathname may include the name of the disk device, such as /rd , or /f0 , or /h0 . It may be be merely the name of some directory, such as /bin or ../test . It mayinclude a filename, as in bin/edit.xrel . It may include disk, directory and filename, as in /f0/bin/edit.xrel .
Notice that each directory name is separated by the delimiter of a / character. A full pathname starts with a disk device, / rd, / f0, / h0 or similar, and lists the entire pathname, starting at the root directory. However, there is often an easier way to reach a particular sub-directory, by starting from whichever directory you are currently in. When a pathname does not start with a ‘ / device’ name it is a relative pathname : the full pathname is obtained by concatenating the current directory pathname to the relative pathname. For example, you can go back one parent directory using cd .. , or back two using cd ../..
, or move back and up to another directory using something like cd ../ newdir/topdir. You can specify that you are starting a relative path from your current directory by indicating your current directory as ‘ . Examples: If the current working directory is "/RD/BIN/SUBDIR" Relative pathname Full pathname .. /rd/bin ../myfile /rd/bin/myfile . /rd/bin/subdir ../../test.s /rd/test.s sub2/myfile /rd/bin/subdir/sub2/myfile ./textfile /rd/bin/subdir/textfile Typical file commands The names of all your files are held in a ‘directory’, and you can see a very detailed list of the names of your files by typing dir .
A directory listing includes various file attributes (detailed later), as well as the size of files, and the date they were created. Each file takes a line of the display. You can use wildcards (the * symbol, used as dir * ) to include sub-directories, or restrict the range of the directory command by doing something like dir bi* , which would show all files and directories starting with bi . Page 36 User Tutorial Manual Files and Directories