Lab 05 - Dropbox Questions
Lab 05 - Dropbox Questions
Lab 05 - Dropbox Questions
Navpreet Kaur
Student:
10270950
Student ID:
Section: 2
Please provide detailed answers to the following questions IN YOUR OWN WORDS. Do
NOT copy/paste from the internet, the lab itself, or from each other!
• I have “chmod’ed” the file “myscript. sh” with the command chmod 644
myscript. sh
• What permissions does ‘myscript. sh’ now have?
Ans- The user and group own the 'myscript. sh' as the file can be viewed and read by the
user and this file can also be seen by anybody else.
• Which permission “group” gets priority?
Ans- The priority of reading can be assessed by groups
• When I type ./myscript.sh will my script run? Why or why not?
Ans- The content does not have permission to be used therefore it will not run or execute.
• You’ve written a script in Linux. WITHOUT actually running it, how else can you
tell if it will run or not? List 2 different ways.
Ans- 1 Method - Bash can validate a script's syntactical validity without running it when
we use the -n option.
2 Method - Another choice is to organize ypur code into functions. You can then run
your code and then check your syntax mistakes.
• Attach a screenshot that clearly shows:
• Your name at the top of the Ubuntu Server VM window
• The (combined) output from the cat contacts.txt and find <value> commands
from Part D (replace the example below)
• Attach a screenshot of your Linux VM window (just the VM window – not the whole
desktop!) that clearly shows:
• Your name at the top of the Ubuntu Server VM window
• All of the visible output from the “LAST ACTIVITY” script
• Your user prompt at the bottom – replace the example below (and make sure I’m
able to read it!)