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

list the linux command path under each question LINUX Solution Answer: NOTE: Ans

ID: 647412 • Letter: L

Question

list the linux command path under each question

LINUX

Explanation / Answer

Answer: NOTE: Answers of commands are shown in bold letters. All are executed from satyacomp user command prompt. 1. Create two directories called PHONE and CALL in your home directory. satyacomp@satyacomp-HP-2000-Notebook-PC:/home$ mkdir PHONE satyacomp@satyacomp-HP-2000-Notebook-PC:/home$ mkdir CALL 2. Create an empty file named MESSAGE.CAL in your home directory. satyacomp@satyacomp-HP-2000-Notebook-PC:/home$ cat > MESSAGE.CAL Press Ctrl+d to save 3. Create a subdirectory in the PHONE directory called BOOK. satyacomp@satyacomp-HP-2000-Notebook-PC:/home$ cd PHONE satyacomp@satyacomp-HP-2000-Notebook-PC:/home/PHONE$ mkdir BOOK 4. Copy the MESSAGE.CAL file into the BOOK directory. satyacomp@satyacomp-HP-2000-Notebook-PC:/home$ cp MESSAGE.CAL PHONE/BOOK satyacomp@satyacomp-HP-2000-Notebook-PC:/home$ cd PHONE/BOOK satyacomp@satyacomp-HP-2000-Notebook-PC:/home/PHONE/BOOK$ ls 5. Move into the BOOK directory. What command shows your current working directory? satyacomp@satyacomp-HP-2000-Notebook-PC:/home/PHONE/BOOK$ pwd /home/PHONE/BOOK 6. Hide the MESSAGE.CAL file in your home directory. satyacomp@satyacomp-HP-2000-Notebook-PC:/home$ ls CALL MESSAGE.CAL PHONE satyacomp satyacomp@satyacomp-HP-2000-Notebook-PC:/home$ mv MESSAGE.CAL .MESSAGE.CAL satyacomp@satyacomp-HP-2000-Notebook-PC:/home$ ls CALL PHONE satyacomp 7. Rename the MESSAGE.CAL file in the BOOK directory to MESSAGE.BAK. satyacomp@satyacomp-HP-2000-Notebook-PC:/home/PHONE/BOOK$ mv MESSAGE.CAL MESSAGE.BAK satyacomp@satyacomp-HP-2000-Notebook-PC:/home/PHONE/BOOK$ ls MESSAGE.BAK 8. Change the permissions on the MESSAGE.BAK file to the following : User = read, write(6) Group = read(4) Other = read(4) satyacomp@satyacomp-HP-2000-Notebook-PC:/home/PHONE/BOOK$ chmod 644 MESSAGE.BAK 9. Move the MESSAGE.BAK file to the CALL directory. satyacomp@satyacomp-HP-2000-Notebook-PC:/home/PHONE/BOOK$ mv MESSAGE.BAK /home/CALL 10. Remove the PHONE directory and all of its contents. satyacomp@satyacomp-HP-2000-Notebook-PC:/home$ rm -rf PHONE 11. Using nano or vim, create a text file containing the following text. Name the file MEMO.EXM (list all steps taken to create the file.) 12. Search your home directory and all subdirectories for any file that contains the word "exam", no matter what the case. satyacomp@satyacomp-HP-2000-Notebook-PC:/home$ nano MEMO.EXM STEPS FOR CREATING FILE 1: At $ prompt type command : cat > filename.ext 2: Then type content text 3: Finally press Ctrl+D to Save 13. Find all files in your home directory that contains the string "MO" in the filename. satyacomp@satyacomp-HP-2000-Notebook-PC:/home$ ls *MO* 14. Gzip the MEMO.EXM file. satyacomp@satyacomp-HP-2000-Notebook-PC:/home$ gzip -c MEMO.EXM > MEMO.EXM.gz 15. Find the total disk usage of your home directory. satyacomp@satyacomp-HP-2000-Notebook-PC:/home$ du /home 16. Create a new user named Test. satyacomp@satyacomp-HP-2000-Notebook-PC:/home$ useradd -D Test 17. View the crontab entry for the new user Test. satyacomp@satyacomp-HP-2000-Notebook-PC:/home$ crontab -u Test -l 18. View the current processes that are running on the system and pipe the results through less. satyacomp@satyacomp-HP-2000-Notebook-PC:/home$ ps PID TTY TIME CMD 13031 pts/11 00:00:00 bash 13425 pts/11 00:00:00 ps 19. Change the owner of the MEMO.EXM.gz file to Test. satyacomp@satyacomp-HP-2000-Notebook-PC:/home$ chown Test MEMO.EXM.gz 20. Decompress the MEMO.EXM.gz file. satyacomp@satyacomp-HP-2000-Notebook-PC:/home$ gunzip MEMO.EXM.gz