1/17
Linux Filesystem Management
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
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
What would be the result of running the command chown :root file1.txt
This would set the group ownership of file1 to root.
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
Which of the following umask settings will result in new files receiving the default permissions -rw-------?
0177
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
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
Which of the following commands will create a symbolic link named foo.txt to an original file named bar.txt
chmod 7777 filename
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.
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
The Filesystem Hierarchy Standard specifies what directory as the root user’s home directory?
/root
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
What is the complete path and filename for the database that is used by the locate and mlocate commands?
/var/lib/mlocate/mlocate.db
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
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
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
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
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
Which of the following commands will delete a directory and all of the files contained within it?
rm -rf olddir