







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








Defn: A UNIX file is a collection of characters stored together. Defn: A UNIX directory is a collection of UNIX files. Defn: Your home directory is the directory you are in when you first log into your UNIX account. Note: You can move from one directory to another within the UNIX file system. Defn: Your current directory or working directory is the UNIX directory you are working in at a particular time. Example: When you first log into your account, your working directory is your home directory.
Defn: A UNIX file system is the organization of the UNIX files on a UNIX computer system. UNIX file systems are organized into a “tree” structure of files and directories. Terms: root, leaf, parent, child The root is referred to in writing commands as “/” not “root”.
Defn: A pathname is an address that uniquely specifies a file’s location in the UNIX file structure. Defn: An absolute pathname gives the position of a file from the root directory. Absolute pathnames always begin with / Examples: Filename Absolute pathname jack /home/jack jill /home/jill possum /home/jill/possum kangaroo /home/jill/Marsupials/kangaroo Your home directory has the pathname ~ Jack’s home directory has the pathname ~jack
Defn: A relative pathname is a pathname that begins at the working directory.
. (“dot”) = the current working directory .. (“dotdot”) = the parent of the current working directory Examples: Suppose your current working directory is jill. Filename Relative pathname possum possum kangaroo Marsupials/kangaroo jill. home .. jack ../jack
unix> cp pathname1 pathname2
unix> more
unix> less
mkdir
Example: If the current working directory is jill mkdir cecs
cd
--returns to home directory cd Example: If the current working directory is jill, cd ../jack/Continents will move the working directory to /home/jack/Continents
rmdir
rmdir will remove a directory if it is empty. If it still has files inside of it, it will give an error message. Example: If the current working directory is jill rmdir ../jack/Oceans will remove the directory Oceans
rm
Example: If the current working directory is Marsupials rm wombat -- will remove /home/jill/Marsupials/wombat The -r option will remove a directory and all of the files and subdirectories contained in the directory. Your working directory must be an ancestor directory of the directory to be removed when you enter the command. rm -r Example: If the current working directory is jill rm -r Marsupials -- will remove /home/jill/Marsupials and all its subdirectories and files