Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
148 views

Unixxx

The document contains questions about Linux file permissions and commands related to viewing, modifying, and managing permissions. It asks about the attributes displayed by ls, recursive options for chmod/chown/chgrp, permission values in octal representation, using chmod to set specific permissions, and commands like find, grep, touch and vi.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
148 views

Unixxx

The document contains questions about Linux file permissions and commands related to viewing, modifying, and managing permissions. It asks about the attributes displayed by ls, recursive options for chmod/chown/chgrp, permission values in octal representation, using chmod to set specific permissions, and commands like find, grep, touch and vi.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

1.Which one of the following is not an attribute displayed by ls command?

a) file permissions

b) file ownership

c) links

d) word count of file

2.Like chmod, chown and chgrp can also use ___ option.

a)-R

b)-r

c)-x

d)-i

3.Which number is assigned to read permission in Octal Permission Representation?

a) 0

b) 1

c) 2

d) 4

4.The Octal number to be given along with chmod command to make a file readable, writable and
executable to the owner, readable and executable to group and others is:

a) 000

b) 755

c) 744

d) 555
5.Which of the following commands is used to display the filenames in multiple columns with
indication of directories and executable file?

a) ls -F -x

b) ls – l

c) ls ~ x

d) lp

6.Which of the following symbol is used with chmod to assign permission to a file?

a) A. -

b) +

c) =

d) *

7.Which command is used with file named ‘note’ to remove the executable permission from the user
and assign read permission to the group and others?

a) chmod u-x, go+rnote

b) chmodgo+r, u+x note

c) chmod g-x, uo+rnote

d) chmodgo+x, u-x note

8.What is group ownership?

a) group of users who can access the file

b) group of users who can create the file

c) group of users who can edit the file

d) group of users who can delete the file


9.Which of the following is default permission set for ordinary files?

a)rw-rw-rw-

b)rwxrwxrwx

c)r-r-r-

d)rw-rw-rwx

10.The syntax of the find command is ____________

a) find path_listselection_criteria action

b) find action path_listselection_criteria

c) find selection_criteria action path

d) find path action

11.What will be the output of the following command?

$ find / -name a.out -print

a) all files having filename as a.out

b) all files in the root directory

c) undefined output

d) erroneous

12.To specify permissions while using find command we have to use _____ option.

a) -perm

b) -inum

c) -name

d) -type
13.What does the following command do?

$ chmodugo +w file01.txt

a) assign write permission to users, group and others

b) assign write permission to the user (owner) only

c) assign write permission to group and others

d) command not executable

14.The default value of Umask is

a) 1024

b) 4021

c) 0022

d) 1001

15.The permission 746 can be represented as

a) rwxrwx- -x

b) rw- -w-r-x

c) rwxr-xr-x

d) rwxr- -rw–

16.To remove write permission from group and others, which one of the following commands will be
used?

a) chmodgo+w file01

b) chmod go-w file01

c) chmod ug-w file01

d) chmod a-w file01


17.Which character is used to replace ‘ugo’ string in chmod command?

a) a

b) v

c) x

d) o

18.Which file access mode grants the capability to modify, or remove the content of the file?

a) Read

b) Write

c) Execute

d) All of the above

19.What are links referred to as in file attributes?

a) number of filenames of a single file that are maintained by the system

b) number of duplicates of a single file

c) number of copies of a single file

d) number of files present in a directory

20.Hard linked files are provided with the same inode number as the original one.

a) True

b) False

21.Which command is used to display all the lines with the string ‘sales’ from the file empl.lst?

(A) cut sales empl.lst

(B) /sales > empl.lst

(C) grep sales empl.lst

(D) cat | /sales > empl.lst


22.Which option is used with the chmod command recursively to all files and sub-directories in a
directory?

(A) –l

(B) –i

(C) –x

(D) -R

23.The octal representation 652 indicates

(A) Execute permission for the owner

(B) Write permission for others

(C) Read and write permission of groups

(D) None of the above

24.The Octal number to be given along with chmod command to make a file readable, writable and
executable to the owner, readable and executable to group and others is:

(A) 000

(B) 755

(C) 744

(D) 555

25.Which command is used to change protection mode of files starting with the string emp and
ending with 1,2, or 3?

(A) chmod u+x emp[1-3]

(B) chmod 777 emp*

(C) chmod u+r ??? emp

(D) chmod 222 emp?


26.Which command is used to list all the files with extension .lst?

(A) ls -l .lst

(B) ls lst

(C) ls .

(D) ls *[lst]

27.In Bourne shell, which file sets the Unix environment for the user when the logs into his HOME
directory.

(A) .exrc

(B) .profile

(C) lastlogin

(D) .mbox

28.Which command is used to make all files and sub-directories in the directory (progs) executable
by all users?

(A) chmod -R a+x progs

(B) chmod -R 222 progs

(C) chmod -1 a+x progs

(D) chmod -x a+x prog

29.The command chmod 761 note is equivalent to

(A) chmod 167 note

(B) chmod u=rwx, g=rw, o=x note

(C) chmod a =761 note

(D) chmod 4=7, g=6,0 =1 note


30.Which command is used to assign only read permission to all three categories of the file ‘note’??

(A). chmod go+r note

(B). chmod a-rw

(C). chmod ugo=r note

(D). chmod u+r,g+r,o-x note

31.Shell script is a_________

a) group of functions

b) a file containing a series of commands

c) a file containing special symbols

d) group of commands

32.To run the script, we should make it executable first by using _____?

a) chmod +w

b) chmod +rwx

c) chmod +x

d) chmod +r

33.Which of the following can be used to open file for reading and making changes in shell
programming?

a) r

b) w

c) r+

d) w+
34.Which option will be used with touch command to change the access time

a) -a

b) -b

c) -t

d) –h

35.Which operator will be used with chmod command to assign absolute permission?

a) +

b) -

c) =

d) %

36.Major expressions used with find command to select file is it has been accessed in more than 375
days, is

a) -atime +365

b) -mtime + 365

c) -atime -365

d) -mtime -365

37.Which command is used with file named 'note' to remove the executable permission from the
user and assign read permission to the group and others?

a) chmod u-x, go+r note

b) chmod go+r, u+x note

c) chmod g-x, uo+r note

d) chmod go+x, u-x note


38.Which command is used to set the three permissions for all the three categories of users of a file?

a) chgrp

b) chown

c) chmod

d) chusr

39.Which of the following commands is used to remove files with confirmation prompt from the
user file system which have neither been accessed nor modified i the last one year?

a) find -mtime +365 | rm

b) grep (/usr/*) – mtime + 365 | -ok rm

c) find -name – mtime + 365 / – ok rm

d) find /user/* \(-mtime + 365 – a – atime +365 \) – OK rm {} \

40.Which command is used with vi editor to save file and remain in the editing mode?

a) :q

b) w:

c) :w

d) r!

You might also like