Professional Documents
Culture Documents
Homework Assignment #2
In this assignment, you’re going to practice navigating the file system and
performing basic file manipulations. Fill in your answers (the commands
that you used) as you follow the instructions below:
5. From your home directory, copy robin and gull (one at a time) into Able
____cp robin early_____________________
_______cp gull able__________________
9. WITHOUT leaving Charly, Copy robin from the parent directory into the
current directory. Use “.” to abbreviate the current directory _________CP
../robin._______________
10. WITHOUT leaving Charly, Copy hawk from Baker directory into the
current directory ______CP ../baker/hawk.____________
11. WITHOUT leaving Charly, copy hawk from Baker to Able ___CP
../Bker/hawk ../able___________________
12. Remove all the files in Able (there are several correct solutions).
_____RM_r able____________________
13. Remove the directory Able RMDIR able_________________________
/
bin
cp
etc
home
Beth
Dan
Alex
bin
csis82
csis80
bin
csis10A
task
log.txt
assign.txt
todo.txt
15. Assume you have access to all the directories in the above tree. Using
absolute pathnames, list the contents of
16. If you are in Dan's csis80 directory, using relative path names, change
directory to
17. Using absolute pathnames, copy todo.txt into the csis82 directory
_______CP todo.tnt
/bin/beth/csis82______________________________________________
18. Using relative path names from directory Alex, copy log.txt into the
csis10A directory ______cp log.tnt
../alex/bin/csis82/csis10a______________________________
19. Assume that your Documents folder is the current directory. Create a
diagram of the directory structure that would result from performing the
following sequence of commands. (Hand draw a tree structure using a
format like the example in problem 10 from assignment 1.)
mkdir Foods
cd Foods
mkdir Soups
cd Soups
mkdir Chowders
cd Chowders
touch clam
touch corn DOCUMENTS
FOODS
cd ..
cd .. SOUPS
mkdir Breads
cd Breads CHOWDERS
touch sourdough
touch naan CLAM
cp -i naan ../Soups/ CORN
cd ..
mkdir Desserts
cd Desserts BREADS
mkdir Pie SOUR DOUGH
mkdir Pie/Fruit MAAN
touch Pie/Fruit/apple
mkdir Cake
touch carrot
mv -i carrot Cake
cd Pie
touch mud
cd ../..
mkdir Trail
touch Trail/gorp
touch Breads/cinnamon
rm -i Breads/sourdough