Name: Ciara Wheeler
EID: E02500688
Bash Command Exercise 3
1.
Please explain what the following command does. What permissions are given to the
owner, group, and others?
chmod 751 hello.py
The 7 means the owner gets read, write, and execute permissions
The 5 means the group gets read and execute permissions
The 1 means others only get execute permissions
2.
What are the parameters of the following command:
chgrp usergroup1 hello.txt
Usergroup1 and hello.txt
3.
Please write a command that uses echo and redirection to create a file, with the name
"
hello world.txt
". Note that there is a space between "hello" and "world" in the filename.
The file's content should be: "hello world".
echo “hello world” > “hello world.txt”
4.
Please (1) explain the
differences
between > and >>, (2) provide two command
examples that
show the difference between > and >>
, and (3) describe the outputs of
the commands.
(1)
both > and >> will “redirect” the output stream
But the > (single greater sign) will overwrite the contents of the file if it is already existing
and has contents in it. The >> (two greater signs) will add the output to the end of the
file.