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

Your login name: jsmith i.e., home directory /home/jsmith. The home directory co

ID: 3882740 • Letter: Y

Question

Your login name: jsmith i.e., home directory /home/jsmith. The home directory contains the following sub-directories: code, tests, personal, misc Unless otherwise specified, you are running commands from the home directory.
1) Change directory to the tests directory using absolute pathname
2) Change directory to the tests directory using relative pathname
3) Use echo command to create a file named fileA with text content ‘Hello A’ in the misc directory
4) Create an empty file named fileB in the misc directory
5) Copy contents of fileA into fileC
6) Move contents of fileB into fileD
7) Create a tar archive called misc.tar for the contents of misc directory
8) Compress the tar archive to create a misc.tar.gz file
9) Move the misc.tar.gz file to the tests directory
10) Uncompress the misc.tar.gz file
11) Extract the archived file from previous step
12) Change directory to the extracted directory
13) List the files in the extracted directory
14) Change the directory back to the home directory
15) Type in the command to confirm the home directory
16) Create a hard link called fileB to fileA in the extracted directory
17) Create a soft link called fileE to fileC in the extracted directory
18) Use the command to list files in the extracted directory such that inode number is displayed
19) Add write right for all to fileD
20) Change access permission to the extracted directory so that the user has all accesses but the group and people only have read access.
21) Search for compress utilities
22) Look for options in the tar command
23) Compare files fileA and fileC in the extracted directory
24) Search for ‘Hello’ in fileA
25) Display the contents of fileA

Explanation / Answer

1 ) cd ../home/jsmith/tests
2 ) cd /tests
3 ) echo 'HELLO A.' >/misc/A.txt
4 ) echo >/misc/B.txt
5 ) cp A C
6 ) mv B D
7 ) tar -zcvf misc.tar misc (first go to the home directory)
8 ) gzip misc.tar
9 ) mv misc.tar.gz /home/jsmith/tests
10) gunzip misc.tar.tz
11) tar -xvf misc.tar
12) cd misc
13) ls /misc
14) cd $home/jsmith
15) pwd
16) ln $home/misc/B $home/misc/A
17) ln -s E C
18) ls -id /misc
19) chmod 777 D
20) cdmod u=rwx misc
22) c – create a archive file.
x – extract a archive file.
v – show the progress of archive file.
f – filename of archive file.
t – viewing content of archive file.
j – filter archive through bzip2.
z – filter archive through gzip.
r – append or update files or directories to existing archive file
23) zip misc.zip A C
24) cat A.txt|grep HELLO
25) cat A.txt

Please Rate an Upvote

Thank You....