% cd # remember you can use ls and pwd to figure out where you are in the directory tree % cd cs21 % mkdir week2 % cd week2 % pwd # should list /home/yourusername/cs21/week2
% cd ~/cs21/week2 # change to your week2 subdirectory % pwd % cp ~newhall/public/cs21/week2/nestedloops.c . % cp ~newhall/public/cs21/week2/stars.c . %lsIf you want to move a file from one directory to another, you can use the mv command. For example, if you accidently copied over the stars.c file into your cs21 subdirectory and you rally wanted it in your week2 subdirectory, you could do the following:
% cd ~/cs21 # change to (move into) your cs21 directory % mv stars.c week2/. # mv source_file destination_file % ls # stars.c should no longer be in current directory, cs21 % cd week2 % ls # should list stars.c
% emacs nestedloops.c &