Lab (2) - System Security and Administration

Preparations:
  • Open two screens on student machine and login on both.
  • Change your diorectory to the cs3530 or cs3531
  • Make a directory lab2 there.
  • Change permission on that directory to read/write/execute to you only.
  • Go inside the directory lab2.
  • Create a file there called lab2.txt, open that file and on its first line put your name. Save and exit the file.

  • 1. Execute the command ls -la and save the result in the lab2.txt file for the answer to this question Q1.

    Now that you are in the lab2.txt file. Answer each of the questions below following their answer. Attach the file to your e-mail once you are done with the lab. The Subject line should say lab2. Make sure you include the question number for each question. For questions where you were asked to write a command, try it and include the output in your file. For question on which you were asked what a command will do, use the man page and the flags to explain, and try the command. Include a brief statement on what the command will do and if you can/possible demo with an example.

    2. Find out what the following command will do? > quota -v

    3. Find out what the following command will do? > df .

    4. Write the command that lists the files that had 0 blocks.

    5. Write the command that lists the system file types.

    6. What is the purpose of the du command?

    7. Write the command that lists the count of all files.

    8. Write the command that lists the grand total of disk usage.

    9. Write the command that lists the number of kilobytes used by each subdirectory.

    10. What is the purpose of the gzip command?

    11. Write and execute the command to copy the file testImg.bmp from my public directory.

    12. Write the command that reduces the size of the testImg.bmp. Then run the ls .la command and include the output of that command in the lab2 file.

    13. What is the purpose of the diff command?

    14. Copy two files from my public directory, file1.txt and file2.txt. Determine the difference between these two files. Include the output in your lab2.txt file.

    15. How do you compare two files without considering the case (upper-case or lower- case). Compare file1.txt and file2.txt with no case option.

    16. What is the purpose of the find command?

    17. Write the command that finds all the files that are larger than 300 kb in your current directory.

    18. Write the command that finds the file fstab on the student machine.

    19. Write the command that finds the files that have been accessed in the last 24 hours.

    20. What is the purpose of the command history?

    21. Write the command to change the number of commands in history to 100.

    22. Run the command ls -la and save the display in your lab2.txt file.

    Please e-mail me the file lab2.txt.