Intro to Linux Flashcards
What argument for the -type option of the find command is used to search for directories?
d (as in “find -type d”)
What command will display all files in all directories and subdirectories from the user’s home directory?
find ~
Which of the following arguments for the -type option of the find command is used to search for symbolic links?
l (as in “find -type l”)
What is the “wc” command?
Meaning “word count”, the “wc” command is used to count the number of lines, words, and bytes (or characters) in a file or input. By itself it shows the number of lines, words, and bytes (or characters) in the file(s), in that order. “wc filename.txt”
What is the “find” command?
The “find” command searches for files and directories in a specific location
Which one is NOT a valid -type option for the find command? [a, b, c, d]
‘a’ is not valid
Which of the followings are logical operators of the find command? [-not, -and, -xor, -true, -or]
-not, -and, -or
What is the difference between the “locate” and the “find” commands?
“locate” searches for the files using a pre-built database, while the “find” command searches the filesystem in real time for the desired file/directory.
What command will remove the files you scare up with the “find” command?
“-remove”
What argument for the -type option of the find command is used to search for files?
f (as in “-type f”
How do you use the output of one command as the input of a second?
”|”, also known as “pipe”.
What command can you use to update the locate database?
updatedb (“sudo updatedb”)
What command is used to update the timestamps of files?
“touch”. It can also make files
What option of the find command do you use to add another option?
“-and” (“find -option -and -option”)
What option of the find command do you use to negate something, or in other words, find its’ opposite?
“-not” (“find -not -option”)
What three numbers do you add up to set permissions in Linux, and what do they mean?
4 (read), 2 (write), 1(execute)
What three entities do you set permissions for?
The owner, the group, and “other”.
What four characters do you use to set permissions, and what do they mean?
r (read), w (write), x (execute), and -(null/nothing). Example: rwx, r-x, r–
What command allows you to find files by name by looking up a database?
“locate”
What command allows the user to search for files in a directory hierarchy with versatile options?
“find”
Which are the symbolic notations for the chmod command?
u, g, o, a
What number base do computers use?
Base 2.
What are the entities in the Linux (or Unix) security model?
user, group, and world(others)