Linux Chapter 4

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/17

flashcard set

Earn XP

Description and Tags

Linux Filesystem Management

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

18 Terms

1
New cards

Which of these commands will set the following permissions on file1.txt?

User = Read, Write, Execute

Group = Read, Execute

Others = Read

  • A. chmod file1.txt 754

  • B. chmod o=rwx,g=rx,u=r file1.txt

  • C. chmod u=rwx, g=rx, u=r file1.txt

  • D. chmod 754 file1.txt

C & D

2
New cards

What would be the result of running the command chown :root file1.txt

This would set the group ownership of file1 to root.

3
New cards

Jan needs to set permissions on a file so that the owner has read, write, and execute permissions. The group should have read permissions only, and everyone else should have no access. Which of the following parameters, when used with the chmod command, would set the permissions described?

740

4
New cards

Which of the following umask settings will result in new files receiving the default permissions -rw-------?

0177

5
New cards

Which of the following commands can be used to update the last modified timestamp on a file, or if the file specified does not exist will create the file?

touch file.txt

6
New cards

Which of the following commands will display all files and directories within the /var/log directory or its subdirectories which are owned by the root user?

find /var/log -user root

7
New cards

Which of the following commands will create a symbolic link named foo.txt to an original file named bar.txt 

chmod 7777 filename

8
New cards

If a hard link is created to a file and then the original file is deleted, which of the following is true?

The original file will be removed while the hard link remains usable to access the contents of the file.

9
New cards

Lynn runs the locate command and the results include many files from a directory that she doesn’t want to include in her search. Which of the following files could Lynn modify so that the locate command no longer includes those results?

/etc/updatedb.conf

10
New cards

The Filesystem Hierarchy Standard specifies what directory as the root user’s home directory?

/root

11
New cards

Jean installs a distribution of Linux on a workstation and attempts to run the locate command to find a certain file. Instead of returning the results she expected, an error message is displayed that it cannot find the mlocate.db file in its default location. Which of the following commands should Jean run in an attempt to resolve this problem?

updatedb

12
New cards

What is the complete path and filename for the database that is used by the locate and mlocate commands?

/var/lib/mlocate/mlocate.db

13
New cards

Mindy wants to create a new subdirectory at ~/2019projects/projectx/projectplans to start storing the initial project plans for projectx. However, this is the first project she has worked on in 2019 and the 2019projects directory does not exist yet. Which of the following commands will create the higher level directories if they do not already exist?

mkdir -p ~/2019projects/project/projectplans

14
New cards

Which of the following commands can be used to recursively search through the directory tree in search of a file that meets a set of given criteria instead of using an indexed database?

find

15
New cards

Nicholas wants to verify whether a file is a hard link to a file within the same directory. Which of the following commands could he use to see information that would be helpful to make this determination?

ls -i

16
New cards

Which of the following are valid permissions for a directory where the command chmod 1777 has been used to set the permissions on it?

drwxrwxrwt

17
New cards

Which of the following options will change the ownership of files and directories recursively within a directory? (Choose all that apply.)

  • A. --follow

  • B. --recursive

  • C. -r

  • D. -R

B & D

18
New cards

Which of the following commands will delete a directory and all of the files contained within it?

rm -rf olddir