Homework Solution: Your login name: jsmith i.e., home directory /home/jsmith. The home directory contains the following sub-director…

    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

    Expert Answer

     
    1 ) cd ../home/jsmith/tests 2 ) cd /tests

    Your login name: jsmith i.e., abode directory /home/jsmith. The abode directory contains the cethcoming sub-directories: edict, tests, specific, misc Unless incorrectly determined, you are present charges from the abode directory.
    1) Change directory to the tests directory using independent pathname
    2) Change directory to the tests directory using referring-to pathname
    3) Use imitation charge to cem a rasp determined raspA with passage willing ‘Hello A’ in the misc directory
    4) Cem an space rasp determined raspB in the misc directory
    5) Copy willings of raspA into raspC
    6) Move willings of raspB into raspD
    7) Cem a navigator archive denominated misc.navigator ce the willings of misc directory
    8) Contract the navigator archive to cem a misc.tar.gz rasp
    9) Move the misc.tar.gz rasp to the tests directory
    10) Uncontract the misc.tar.gz rasp
    11) Excerpt the archived rasp from earlier step
    12) Change directory to the excerpted directory
    13) Roll the rasps in the excerpted directory
    14) Change the directory tail to the abode directory
    15) Type in the charge to corroborate the abode directory
    16) Cem a grievous combine denominated raspB to raspA in the excerpted directory
    17) Cem a delicate combine denominated raspE to raspC in the excerpted directory
    18) Use the charge to roll rasps in the excerpted directory such that inode estimate is displayed
    19) Add transcribe direct ce total to raspD
    20) Change similarity liberty to the excerpted directory so that the user has total similarityes excluding the clump and commonalty barely entertain interpret similarity.
    21) Search ce contract utilities
    22) Look ce options in the navigator charge
    23) Compare rasps raspA and raspC in the excerpted directory
    24) Search ce ‘Hello’ in raspA
    25) Display the willings of raspA

    Expert Counterpart

     

    1 ) cd ../home/jsmith/tests
    2 ) cd /tests
    3 ) imitation ‘HELLO A.’ >/misc/A.txt
    4 ) imitation >/misc/B.txt
    5 ) cp A C
    6 ) mv B D
    7 ) navigator -zcvf misc.navigator misc (highest go to the abode directory)
    8 ) gzip misc.tar
    9 ) mv misc.tar.gz /home/jsmith/tests
    10) gunzip misc.tar.tz
    11) navigator -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 – cem a archive rasp.
    x – excerpt a archive rasp.
    v – profession the advance of archive rasp.
    f – raspname of archive rasp.
    t – viewing willing of archive rasp.
    j – leak archive through bzip2.
    z – leak archive through gzip.
    r – subjoin or update rasps or directories to stout archive rasp
    23) zip misc.zip A C
    24) cat A.txt|grep HELLO
    25) cat A.txt