Tip:
Highlight text to annotate it
X
Unix Directory Manipulation Commands
The command: pwd gives the name of the present working directory.
The command: ls -F gives the names of the subdirectories in the present working directory.
A new directory can be created with the command: mkdir This is an abbreviation of "make directory."
In this example I am making a new directory called newdirectory.
Then the new directory is created.
We can change into a directory with the cd command followed by the directory name. cd newdirectory.
I am now in the newdirectory. The pwd comand shows me this.
In this example the newdirecory is empty so no files are shown.
You can change back to your home directory with command: cd with no arguments.
I am now logged into the home directory
You can remove a directory with the command: mkdir newdirectory. This removes the newdirectory.
The new directory has been removed.
A couple of additional commands are: whoami which shows the login id of the user.
The second is whereis This allows the user to find the location of files related to commands.