Linux Ex 5

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

What are the permissions on the file /etc/passwd ?

-rw-r--r--

Things that often change size are usually kept somewhere in the _____ directory.

/var

Directories must have execute permission set to allow users to cd into that directory.

True, directories must have execute permission to allow pass-through. Try it for yourself. Make a directory, then chmod 644 [dirname] cd dirname You will notice that you are blocked from going in there even though you are the owner. Typically we set directories to be 755 that are public directories.

You can manipulate files and do whatever you want from anywhere on the system without having to cd to the directory the file is in.

True, you do not need to move somewhere to do something instead you can just specify the path (absolute or relative). At first it is definitely easier to just move to the directory but you do not need to.

In Unix/Linux directories are also files but they contain the pointers to other files.

True. Directories are just another type of file that point to other files, therefore it appears that the other files are inside of them. Another way to say this is that directories are files that have as their data the names of other files.

Set the permissions on a file called group_info.txt to be read and writable by you and readable only by those in your group. Use the numeric style of permissions and assume that the file is in the parent directory and you are setting the permissions without cd'ing up to that directory.

chmod 640 ../group_info

You have a file that you want a friend to look at, they tell you that they got a 'permission denied' message when they tried to run the more utility on it. Which is the correct method of allowing them to view it? You are in the same group.

chmod 640 filename

Give the command to set the permissions on a file named index.html which is a web page viewable by anyone, and read-writable by you. Use the numbered permission changing scheme to ensure that all permissions are set correctly. Assume that the file is in your present working directory.

chmod 644 index.html

Give the command to set the permissions on a directory so that people in your group can traverse it but not write to it. People in the 'other' group should not even be able to see it's contents. Be sure that you have full control over it. Do this with 1 command, using numeric permissions and assume that the directory is in the current directory and is called dir1 .

chmod 750 dir1

Using numeric style permissions set the permissions on a directory to be publicly readable. Assume that the directory is called public and is in your current working directory.

chmod 755 public

You use the __ utility to see how much space in the different file systems is in use.

df

Enter the command you would use to find the line numbers that the word "seer" is on in the file named poem which is located in ~smauney/public

grep -n seer ~smauney/public/poem

Enter the command to create a soft link from a file called original_file to a file called soft_linked_file assume that the link is going to be in the parent directory but you are making the link from the current directory where the original_file file resides.

ln -s original_file ../soft_linked_file

Give the command to create a hard link from a file that is in your current directory called file1 to a file called file2. Assume that file1 is currently in your current directory, and that file2 will be in the parent directory.

ln file1 ../file2

The correct permission to set a web page is:

644

Enter the command that you would enter to see the bottom (last 10 lines) of the command line history file of the user smauney.

tail -10 ~smauney/ .bash_history


Set pelajaran terkait

P1_L1-Chapter1- Security Mindset

View Set

Series 66 Uniform Securities Act Quiz #1

View Set

Nutrition and Addiction EAQ questions

View Set

Business Law Ch.6: Tort Law & Cybertorts

View Set

SEC+ 501 - CHAPTER ONE REVIEW QUESTION

View Set