Any help with these questions will be appreciated Thank You
Any help with these questions will be appreciated. Thank You.
Question 5
cd to the directory called final that is located within my home directory.
When you more the file called blink, you get the error message:
blink: Too many levels of symbolic links
A. What is it that is causing this error...specifically?
The link called blink does not exist.
The link called blink is linked to a very large file.
Too many symbolic links.
The link called blink is a link to alink. The link called alink is a link back to blink.
The file called blink should be called beelink.
Question 6
cd to the root directory. Execute the following command:
ls -ld /tmp
You will notice that the permissions on the /tmp directory contain the sticky bit. (The permissions end with a t)
A. What is the significance of the sticky bit being set on a directory?
(Hint: see the man page for the chmod command for more info on the sticky bit)
The sticky bit prevents a file from being deleted....forever.
A file can only be deleted or modifed by the user if owned by the user or can be deleted or modified by a privileged user.
The sticky bit prevents a file from being copied.
The sticky bit makes the file an executable file.
Question 7
You need to locate the PID of a process in the process table so that the process can be killed. On the UML system, construct a command string that will locate ONLY the PID of the process called init (/sbin/init).
The output of your command string should be a single number which is the PID of the init process.
Replace the ## to complete the comand string. The comand string must generate the output described above.
ps -ef | grep init | grep -v \'grep\' | awk \'{ print ## }\'
Question 8
cd to the directory called final that is located within my home directory.
When you cat the file entry called sga, you get the error message:
cat: sga: No such file or directory
What is it that is causing this error?
sga is a link.
sga is a link to file that does not exist.
sga does not exist in my directory called final.
The permissions on sga do not allow you to read the file.
Question 9
Consider the following alias:
alias dirc=\'ls -l | grep \'^d\' | wc -l\'
What EXACTLY will this alias do when it is executed?
The alias will list the sub-directores in the current directory.
The alias will count the files in the current directory.
The alias will output the number of sub-directories in the current directory.
The alias will grep for the file called ^d.
Question 10
Create the following alias.
alias gohome=\'cd $home\'
Upon executing the alias called gohome, you will....
Change directory to the directory called home.
Change directory to the directory of a user called home.
Change directory to my (fveglian) home directory.
Change directory to your own home directory.
| The link called blink does not exist. | ||
| The link called blink is linked to a very large file. | ||
| Too many symbolic links. The link called blink is a link to alink. The link called alink is a link back to blink. | ||
| The file called blink should be called beelink. |
Solution
Question 5
cd to the directory called final that is located within my home directory.
When you more the file called blink, you get the error message:
blink: Too many levels of symbolic links
A. What is it that is causing this error...specifically?
Too many symbolic links.
The link called blink is a link to alink. The link called alink is a link back to blink.
Question 6
cd to the root directory. Execute the following command:
ls -ld /tmp
You will notice that the permissions on the /tmp directory contain the sticky bit. (The permissions end with a t)
A. What is the significance of the sticky bit being set on a directory?
(Hint: see the man page for the chmod command for more info on the sticky bit)
A file can only be deleted or modifed by the user if owned by the user or can be deleted or modified by a privileged user.
You need to locate the PID of a process in the process table so that the process can be killed. On the UML system, construct a command string that will locate ONLY the PID of the process called init (/sbin/init).
The output of your command string should be a single number which is the PID of the init process.
Replace the ## to complete the comand string. The comand string must generate the output described above.
ps -ef | grep init | grep -v \'grep\' | awk \'{ print $0 }\'
Question 8
cd to the directory called final that is located within my home directory.
When you cat the file entry called sga, you get the error message:
cat: sga: No such file or directory
What is it that is causing this error?
sga does not exist in my directory called final.
Question 9
Consider the following alias:
alias dirc=\'ls -l | grep \'^d\' | wc -l\'
What EXACTLY will this alias do when it is executed?
The alias will output the number of sub-directories in the current directory.
Create the following alias.
alias gohome=\'cd $home\'
Upon executing the alias called gohome, you will....
Change directory to your own home directory.


