Cs 315 Lab2

1281 Words6 Pages
CS 315 Lab 02 A. Try to find the proper Linux commands that will answer the following questions. Hint: You can either find the answer from the textbook or from the Internet. *You need to write the procedure that is necessary to accomplish the tasks listed below. Test to see if your answers are correct and type your correct answer under each question. Upload your finished lab document to the dropbox. 1. Use the ls command to list the contents of the root file system directory (/) on your system. ls / 2. Use the ls -l command to view the contents of the root file system directory (/). ls –l / 3. Determine the inode value for the /etc directory. ls –i / 4. Make /etc your current working directory and then…show more content…
11. With your home directory as your current directory, use the command to remove read, write, and execute permissions from group and others for the spreadsheets directory. Next, verify that your change has taken place. cd documents ls –l chmod 700 spreadsheets ls –l 12. Use the cat command to create a two-line file in your home directory called datainfo. On the first line enter 144 and on the second line enter 288. After the file is created, copy it from your home directory to the spreadsheets directory you created. cat >datainfo 144 288 cp datainfo documents/spreadsheets 13. Determine the default permissions on the datainfo file your created. Next, set the permissions on the datainfo file so that the owner, group, and others can read and execute the file (otherwise leave the default settings as is). cd docments cd spreadsheets ls –l chmod ugo+x datainfo 14. Append the current month’s calendar to the datainfo file that is in your home directory. Next copy your changed datainfo file over the older datainfo file in the spreadsheets directory, but use the copy option that prompts you before you overwrite the file in the spreadsheets directory. Check the contents of the datainfo file in the spreadsheets directory to make certain your copy was successful. cal >> datainfo cp -i datainfo documents/spreadsheets y cd documents cd spreadsheets cat datainfo 15. Make the spreadsheets

    More about Cs 315 Lab2

      Open Document