For in-class tasks, you are required to execute the commands as instructed and capture the command history upon completion. To ensure that only the commands executed during the current session are captured, it’s recommended to start each session with a clean history. Use the following command to clear the command history stored in the current session.
# Clear the current session's history
history -c- Execute ls -l in one of your directories that contains some items. Discuss the mode, owner and group of at least 3 of your files or directories.
- Discuss on read, write and execute permission with your class mate.
- -rw- - - - - - - What does hyphen (-) represent?
- Explain the following permission (discuss with your class mate)
- -rw- - - - - - -
- drwxr-x- - -
- -rw-rw-rw-
- -rwxr-x- - -
- Use octal notation for following permissions (discuss with your class mate)
- -rw- - - - - - -
- drwxr-x- - -
- -rw-rw-rw-
- -rwxr-x- - -
- View file permissions and ownership for one of your file.
- Change the file permission (read and write for the owner, read for group and read for public)
- Change the owner of the file to another user that exists in your system.
- Change the group ownership for the file to some other group that exists in your system.
- View permissions and ownership for one of your directory.
- Change the directory permission (read and write for the owner, read and write for group and no permission for public)
- Change the owner of the directory to some other user that exists in your system
- Change the group ownership of the directory to another group that exists in your system.
After you have done all the above tasks, you will run the following command and create firstname_lastname_T3.txt file in your home directory.
history >firstname_lastname_T3.txt
echo "User: $(whoami), Date and Time: $(date)" >> firstname_lastname_T3.txtType explorer.exe . in your terminal and you will see the file firstname_lastname_T3.txt
Now drag that file to your repository for third portfolio.
Note: Always, check the contet of the file created to verify it includes every commands that you have executed.