Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Part 1: (3 pts) Create a directory called EXAM . In that directory create three

ID: 3719773 • Letter: P

Question

Part 1: (3 pts)

Create a directory called EXAM.
In that directory create three directories sub1, sub2, sub3.
In directory sub1 create a file named file1.
In directory sub2 create a file named file2.
In directory sub3 create a file named file3.
Change the permissions on each of the files to have all privileges for all users.

Part 2: (2 pts)

Copy the file /EXAM/theanswer.tar.gz to the EXAM directory that you created.
Uncompress and extract the contents of the archive. The result is that the file originally in the archive will now reside in the EXAM directory.

Explanation / Answer

Answer:

Part 1:

mkdir EXAM #Creates EXAM directory
cd EXAM #Enters into EXAM directory
mkdir sub1 # Creates sub1 directory inside EXAM directory
mkdir sub2 # Creates sub2 directory inside EXAM directory
mkdir sub3 # Creates sub3 directory inside EXAM directory
cd sub1 #Enters into sub1 directory
touch file1 #creates file1 inside sub1 directory
chmod 777 file1 #provides all access to all users to access file1
cd ../sub2/ #Enters into sub2 directory
touch file2 #Creates file2 inside sub2 directory
chmod 777 file2 #provides all access to all users to access file2
cd ../sub3/ #Enters into sub2 directory
touch file3 #Creates file2 inside sub3 directory
chmod 777 file3 #provides all access to all users to access file3

Part 2:
cp theanswer.tar.gz /EXAM/ # copies the theanswer.tar.gz file into EXAM directory
tar -xvzf theanswer.tar.gz # it will uncompress the file and stores the files inside EXAM folder

Another way to uncompress from Archive folder is,
Go to Archive folder,
tar -xvzf theanswer.tar.gz -C ~/EXAM # It will directly uncompress and saves the files in EXAM folder.