Linux Questions & Answers – File Management – 1

This set of Linux / Unix questions and answers focuses on Linux administration for Freshers on File Management area. It will be useful for anyone learning Linux Basics, Essentials and/or Administration.

1. By default if any regular file is created, the number of link is displayed as 1 ?
a) True
b) False
View Answer

Answer: a
Explanation: None.

2. How many links are created when we creat a directory file?
a) 1
b) 2
c) 3
d) 4
View Answer

Answer: b
Explanation: None.

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
View Answer

Answer: b
Explanation: None.
advertisement

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
View Answer

Answer: a
Explanation: None.

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
View Answer

Answer: b
Explanation: None.
Free 30-Day Python Certification Bootcamp is Live. Join Now!

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
View Answer

Answer: c
Explanation: None.

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
View Answer

Answer: d
Explanation: None.

8. Which command is used to change permissions of files and directories?
a) mv
b) chgrp
c) chmod
d) set
View Answer

Answer: c
Explanation: None.

9. Where can I find the printer in the file structure?
a) /etc
b) /dev
c) /lib
d) /printer
View Answer

Answer: b
Explanation: None.
advertisement

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
View Answer

Answer: c
Explanation: None.

11. What UNIX command is used to update the modification time of a file?
a) time
b) modify
c) cat
d) touch
View Answer

Answer: d
Explanation: None.

Sanfoundry Global Education & Learning Series – Linux Administration & Programming.

Here’s the list of Best Books in Linux Commands & Shell Programming.
Here’s the list of Best Books in Linux Kernel, Device-Drivers & System Programming.

To practice all questions on Linux Administration & Programming, here is complete set of 1000+ Multiple Choice Questions and Answers on Linux.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
I’m Manish - Founder and CTO at Sanfoundry. I’ve been working in tech for over 25 years, with deep focus on Linux kernel, SAN technologies, Advanced C, Full Stack and Scalable website designs.

You can connect with me on LinkedIn, watch my Youtube Masterclasses, or join my Telegram tech discussions.

If you’re in your 40s–60s and exploring new directions in your career, I also offer mentoring. Learn more here.