1 The Assignment Demonstrate your grasp of the Unix file system by constructing
ID: 3714324 • Letter: 1
Question
1 The Assignment
Demonstrate your grasp of the Unix file system by constructing a directory structure as follows:
In your home ( ~ ) directory, create a directory named “UnixCourse”.
This directory will be used in the remaining assignments of this course, as well as this one.
Several of the commands that you will issue in this course will examine files in this directory and, in some cases, send me a listing of those files or even copies of those files for grading and diagnostic purposes. So you should not store anything unrelated to the course assignments in this ~/UnixCourse area.
Within your UnixCourse directory, you should create a directory named “fileAsst”. Within that directory, you should create two directories, named “Planes” and “Ships”.
Use the ls command to check your work.
Within the Planes directory, you should place a copy of the file ~cs252/Assignments/fileAsst/spitfire.txt
Use the ls command to check your work.
Within the Ships directory, you should place a copy of the file ~cs252/Assignments/fileAsst/frigate.txt
Use the ls command to check your work.
When you have completed this much, execute the command
(Take note of the difference between the numeric digit 1 and the lower-case letter l. If you can’t tell the difference between these, check your web browser settings to see if you can use some better fonts.)
This will check to see if you have built the desired directory structure so far. You should repeat the above steps as necessary until this command reports success.
If you have been successful so far, the fileAsst-1 command will have placed a new file somewhere in the directory structure you have built. Find it, and move it into the Planes directory, renaming the file to “carrier.dat”.
Execute the command
please help ive gotten past the mkdir i need help with the data.
Explanation / Answer
TO go to home directory: cd
To create a directory named “UnixCourse”: mkdir UnixCourse
cd UnixCourse
mkdir fileAsst
cd fileAsst
mkdir Planes
mkdir Ships
ls
cd Planes
cp ~cs252/Assignments/fileAsst/spitfire.txt .
ls
cd ..
cd Ships
cp ~cs252/Assignments/fileAsst/frigate.txt .
ls
~cs252/bin/fileAsst-1
For -" Find it, and move it into the Planes directory, renaming the file to “carrier.dat”."
cd
cd UnixCourse
ls -R ~/UnixCourse/
Then, you will get the name of file in output. FInd the new file.
Suppose name is- new.txt
Then, do:
find ~/UnixCourse/ -name "new.dat"
This will give you path. Suppose: ~/UnixCourse/Ships
Then copy as follows:
cp path/filename /UnixCourse/Planes/carrier.dat
E.g.
cp ~/UnixCourse/Ships/new.dat /UnixCourse/Planes/carrier.dat
Execute the command
~cs252/bin/fileAsst-2
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.