Linux Questions & Answers on File Management for Freshers

1. By default if any regular file is created, the number of link is displayed as 1 ?

a) True
b) False
Answer: a
2. How many links are created when we creat a directory file?

a) 1
b) 2
c) 3
d) 4
Answer: b
3. A user creates a link to a file file1 using the following command “ln file1 file2”. Which of the following is not true?

a) file1 and file2 have the same inode numbers
b) The number of links for file1 is displayed as 1
c) The number of links for file1 is displayed as 2
d) The number of links for file2 is displayed as 2
Answer: b
4. There are two hard links to the “file1” say hl and h2 and a softlink sl. What happens if we deleted the “file1”?

a) We will still be able to access the file with hl and h2 but not with sl
b) We will not be able to access the file with hl and h2 but with sl
c) We will be able to access the file with any of hl, h2 and sl
d) We will not be able to access the file with any of hl, h2 and sl
Answer: a
5. If two files on same partition point to the same inode structure they are called

a) Soft links
b) Hard links
c) Alias
d) Special files
Answer: b
6. Deleting a soft-link

a) Deletes the destination file
b) Deletes both the softlink and the destination file
c) Deletes just the softlink
d) backup of the destination is automatically created
Answer: c
7. Creation of hardlinks that point across partitions

a) is allowed only to root user
b) can be done by all users
c) the effects are unspecified
d) is not allowed
Answer: d
8. Which command is used to change permissions of files and directories?

a) mv
b) chgrp
c) chmod
d) set
Answer: c
9. Where can I find the printer in the file structure?

a) /etc
b) /dev
c) /lib
d) /printer
Answer: b
10. Which of the following statement is true?

a) The cp command will preserve the meta data of the file
b) The sort command by default sorts in the numeric order
c) The mv command will preserve the meta data of the file
d) The command ps will display the filesystem usage
Answer: c
11. What UNIX command is used to update the modification time of a file?

a) time
b) modify
c) cat
d) touch
Answer: d
12. Which of the following time stamps need not exist for a file on traditional unix file system

a) Access Time
b) Modification Time
c) Creation Time
d) Change Time
Answer: c
13. Which command is used to set limits on file size

a) fsize
b) flimit
c) ulimit
d) usize
Answer: c
14. Which option of rmdir command will remove all directories a, b, c if path is a/b/c

a) –b
b) –o
c) –p
d) –t
Answer: c
15. Which represents the user home directory

a) /
b) .
c) ..
d) ~
Answer: d
16. If a file is removed in Unix using ‘rm’ then

a) The file can be recovered by a normal user
b) The file cannot be recovered by a user
c) The file can be fully recovered provided the sytem is not rebooted
d) The file will be moved to /lost+found directory and can be recovered only by administrator’s intervention
Answer: b
17. Executing the ‘cd ..’ command when at the root level causes

a) Error message indicating the user can’t access beyond the root level
b) Behavior is unix-flavor dependent
c) Results in changing to the ‘home’ directory
d) Nothing happens
Answer: d
18. How do you rename file “new” to file “old”?

a) mv new old
b) move new old
c) cp new old
d) rn new old
Answer: a
19. What command is used to copy files and directories?

a) copy
b) cp
c) rn
d) cpy
Answer: b
20. When mv f1 f2 is executed which file’s inode is freed?

a) f1
b) f2
c) new inode will be used
d) no inode is freed
Answer: b
21. Any file’s attribute information is stored in which structure on the disk

a) Inode
b) Data blocks
c) File blocks
d) Directory file
Answer: a

Related

Multiple Choice Questions 3223327120106940675

Post a Comment

emo-but-icon
:noprob:
:smile:
:shy:
:trope:
:sneered:
:happy:
:escort:
:rapt:
:love:
:heart:
:angry:
:hate:
:sad:
:sigh:
:disappointed:
:cry:
:fear:
:surprise:
:unbelieve:
:shit:
:like:
:dislike:
:clap:
:cuff:
:fist:
:ok:
:file:
:link:
:place:
:contact:

item