SECTION 1 - Absolute/Relative Paths, Files and Directories: 1. Log into the studenti account. Enter the command to tell

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

SECTION 1 - Absolute/Relative Paths, Files and Directories: 1. Log into the studenti account. Enter the command to tell

Post by answerhappygod »

Section 1 Absolute Relative Paths Files And Directories 1 Log Into The Studenti Account Enter The Command To Tell 1
Section 1 Absolute Relative Paths Files And Directories 1 Log Into The Studenti Account Enter The Command To Tell 1 (33.06 KiB) Viewed 52 times
Section 1 Absolute Relative Paths Files And Directories 1 Log Into The Studenti Account Enter The Command To Tell 2
Section 1 Absolute Relative Paths Files And Directories 1 Log Into The Studenti Account Enter The Command To Tell 2 (44.07 KiB) Viewed 52 times
Section 1 Absolute Relative Paths Files And Directories 1 Log Into The Studenti Account Enter The Command To Tell 3
Section 1 Absolute Relative Paths Files And Directories 1 Log Into The Studenti Account Enter The Command To Tell 3 (46.44 KiB) Viewed 52 times
Section 1 Absolute Relative Paths Files And Directories 1 Log Into The Studenti Account Enter The Command To Tell 4
Section 1 Absolute Relative Paths Files And Directories 1 Log Into The Studenti Account Enter The Command To Tell 4 (37.45 KiB) Viewed 52 times
Section 1 Absolute Relative Paths Files And Directories 1 Log Into The Studenti Account Enter The Command To Tell 5
Section 1 Absolute Relative Paths Files And Directories 1 Log Into The Studenti Account Enter The Command To Tell 5 (36.9 KiB) Viewed 52 times
SECTION 1 - Absolute/Relative Paths, Files and Directories: 1. Log into the studenti account. Enter the command to tell you what your current directory is: Now ed to the /tmp directory. Enter two commands, which will change your directory to the home directory for studenti: and Verify these two commands work by displaying your current directory after each one is run. 2. Ensure you are in your home directory for studenti. List the contents of the /tmp directory using an absolute path name: List the contents of the /tmp directory using a relative path name: After listing the contents of a directory, does your present working directory change? What command changes your present working directory? 3. Ensure you are in your home directory for studentl. Change your current directory to the root () directory. What command did you use: 4. Enter the ed command. What directory are you now in? Explain what "-"represents:

5. Ensure you are in your home directory for student Create a file called Inbfile with the touch command in the /tmp directory using a relative path name. What command did you use: Create another file called labfile with the touch command in the /tmp directory using an absolute path name. What command did you use; 6. What is the file size of files created with the touch command? Now touch one of these files again. What, if anything is different in the file's characteristics? 7. Ensure you are in your home directory for studentl. Using the echo command with output redirection, and an absolute path, add 10 lines to the /tmp/labfilel file. Make each line just one word - linel, line2 through line 10 What is the new file size of the /tmp/abſile1 file? In what storage units are files displayed in unix? Ensure you are in your home directory for studenti. Use the tail command and a relative path to display the last 5 lines of the /etc/passwd file. What command did you use: Ensure you are in your home directory for studentl. Use the head command and an absolute path to display the first 5 lines of the /etc/group file. What command did you use: 8. Ensure you are in your home directory for studentl. Create a new subdirectory in your home directory called subdir1. What command did you use: Change your current directory to the subdirl directory using a relative pathname. What command did you use: Change back to your home directory for studentl. Create a file called labfile3 in this subdirl directory using the touch command with a relative pathname. What command did you use:

2. Ensure you are in your home directory of the studenti account. Use the echo command with output redirection to create a file called labfiled and put the following text in this file: "This is the first line of lubfilo". Using the symbolic notation for permissions, what are the permissions on this file: Ensure the permissions on the labfiled file and the current directory (sudentl) are read and execute, and not write, for group. Set them with the chmod command if necessary. Su - into the student2 account. As the student2 user, display the contents of the labfiled file using the cat command. Can you do it? While still logged into the student2 account, attempt to append a second line of text called "This is the second line of labfilo4" to the labfiled file using the echo >> command. Can you do it? Why or why not? While still logged into the student2 account, attempt to set write permission for group on the labfile4 file from the student2 account, using a relative path. What command did you enter? Can you do it? Why or why not? Log out of the student2 account and back into the student account and change the permissions on the labfile4 file to include write permission for group, leaving the read and execute access on it. What command did you enter to do this? Why can student change permissions on this file? Now su - back into the student2 account. Again attempt to append a second line of text called "This is the second line of labile4" to student l's labfile4 file using the echo >> command. Can you do it? Why or why not? 3. Does the owner of a file change when a non-owner successfully writes to the file? a or

DIRECTORY PERMISSIONS: 1. While in the student account, ensure you are in the home directory of the studenti account. Create a new subdirectory called subdir2. What command did you use: Using the octal notation for permissions, what are the permissions on this directory file: While still in the student account, use the echo > command with output redirection, create a file in the subdir2 directory called labfiles and put the following text in this file: "This is the first line of labfiles". Ensure the permissions on the subdir2 directory and the subdiv2/labdiles file are read and execute, and not write, for group Set them with the chmod command if necessary Now su - to the student account. As the student2 user, ensure you are in your home directory Display the contents of this labfiles file using a relative path with the eat command. What command did you use: Can you view this file? (you should be able to...). Attempt to append a second line of text called "This is the second line of labfiles" to the labfile5 file using the echo command with output redirection. Can you do it?

Why or why not? Attempt to delete the labfiles file from student2 nccount Can you do it? Create a file called lubfiles in the subdir2 directory. Can you do it? What three file operations does write permission allow on a directory, even if write is not enabled on files within? 2 3 DEFAULT PERMISSIONS (UMASK): 1. Ensure you are in the home directory of any account (student? or 2) Create a file called labfile7. What are the permissions on this file, in symbolic notation? Explain in detail, how the permissions got set this way on this file, in regard to umask, Be Specifie. (Also explain why execute is not set on this file)? Create a subdirectory called subdir). What are the permissions on this directory file, in octal notation? Explain in detail, how the permissions got set this way on this directory in regard to umask. Be Specific SECTION 3 - Variables, Special Characters and Misc: 1. Clearly explain the reason for the difference between the output of echo SHOME and echo SHOME? 2. Explain what happens when just running the ed command: 3. Explain why the ed Shome command also changes your pwd back to your home directory
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply