When you log into unix you Root directory You are here are in the root directory
To create a new directory you Root directory You are here must type:
mkdir newdirectory newdirectory This will create a new directory call newdirectory. You may call your new directory anything you want
To move to your newly Root directory created directory you will type:
You are here cd newdirectory newdirectory
Handout by Blanca Polo To create a file in your Root directory current directory you will type pico filename newdirectory You are here
List of contents of •filename your newdirectory
When directories are first created they are empty. Handout by Blanca Polo You will now edit/type the file. Keep in mind that the mouse doesn’t work here. You will use the arrow keys to move around.
Once you are done editing/creating the file type
Type Y here to save the file.
Be sure to read whatHandout UNIX by Blanca has Poloto say. Press
Files are saved inside the Root directory directory in which you currently are. Since you are in newdirectory, your file You are here filename was saved here. newdirectory •filename
To go back to the root directory you will type cd
ls –la To list all your files rm filename deletes the file named filename cp file1 file2 copies file1 into another file named file2 Root directory cd . . Goes up one directory level V isu al ex newdirectory am ple dir2 h ere •filename
You move to here Other directory cd . .
You are here first Bottom directory
Handout by Blanca Polo mkdir dirname creates a directory called dirname under the current directory where you are currently located rmdir dirname deletes the directory named filename from under the directory where you are currently located cd moves all the way to the root directory
V isu al You move to here Root directory ex am ple h ere dir2
Other directory cd
You are here first Bottom directory
The only difference in cd to move one level up or all the way to the root is in the two dots Handout by Blanca Polo