In: Computer Science
CompTIA Linux+ Guide to Linux Certification (4th Edition)(Please do not do it on mac and please add photos of the virtual machine.)
Project 4-11 In this hands-on project, you configure and research filesystem attributes.
1. Switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and log in to the terminal using the user name of root and the password of LNXrocks!.
2. At the command prompt, type touch toughfile and press Enter. Next, type lsattr toughfile at the command prompt and press Enter. What filesystem attributes are set on toughfile by default?
3. At the command prompt, type chattr +i toughfile and press Enter. Next, type lsattr toughfile at the command prompt and press Enter. Is the immutable attribute set on toughfile?
4. At the command prompt, type vi toughfile and press Enter. Does the vi editor warn you that the file is read-only? Add a line of text of your choice in the vi editor and attempt to save your changes using w! at the : prompt. Were you successful? Quit the vi editor using q! at the : prompt.
5. At the command prompt, type rm –f file1 and press Enter. Were you successful? Why?
6. At the command prompt, type chattr –i file1 and press Enter. Next, type rm –f file1 and press Enter. Were you successful this time? Why?
7. At the command prompt, type man chattr and press Enter. Search the manual page for other filesystem attributes. Which attribute tells the Linux kernel to automatically compress/decompress the file as it is written and read from the filesystem? Which attribute causes the data blocks of a file to be immediately overwritten once the file has been deleted? Type q and press Enter to quit out of the manual page when finished.
8. Type exit and press Enter to log out of your shell.
Step 2
*********
Step 3
**********
Step 4
**********
not editable its read only
Step 5
***********
Step 6
**********
Step 7
**********
A file with the c attribute set is automatically compressed on the disk by the kernel. A read from this file returns uncompressed data. A write to this file compresses data before storing them on the disk.
Thanks