Linux Final Exam Prep. | Complete Questions & Answers (Rated 100%)
Linux Final Exam Prep. | Complete Questions & Answers (Rated 100%) Linux Final Exam Prep. | Complete Questions & Answers (Rated 100%) Show the home directory of the current user (Don't list the contents or go there, just print the home directory path) - ANSWER - echo ~ or echo $HOME List everything in the current directory which contains a dot in its name (has some extension) - ANSWER - ls *.* Create subdirectories of the current directory named tom, dick, and harry - ANSWER - mkdir tom dick harry Create two hundred subdirectories of the current directory with the names bill100 through bill299 (No, don't write a command with 200 parameters) - ANSWER - mkdir bill{100...299} Remove every file in the system. (You might not want to actually run it) - ANSWER - rm -r / Find out the number of files stored in the directory /usr/bin - ANSWER - ls -l /usr/bin | wc Remove permission for anyone but the owner to read the file maxie, but leave other existing permissions alone - ANSWER - chmod g-r, o-r maxie Using /ext/passwd, count the number of accounts on the system which contain the string student in their password entry - ANSWER - grep student /etc/passwd | wc Assuming stuff is a sub-directory of the current directory, make sure no one (but root) can create or delete files there - ANSWER - chmod g-w, o-w stuff The types of commands are built-ins, executables, __________, and shell functions - ANSWER - aliases What is the difference between echo Hi there and echo " Hi there"? - ANSWER - Output from the first one omits most of the spaces, but the second preserves them. Which kind of expansion does NOT start with a dollar sign? - ANSWER - pathname expansion The command cat fred{1,2}{3,4,5}.txt is equivalent to - ANSWER - cat What is the | symbol used for in Unix commands? - ANSWER - to use the output of one program as the input to another
Información del documento
- Subido en
- 9 de agosto de 2023
- Número de páginas
- 7
- Escrito en
- 2023/2024
- Tipo
- Examen
- Contiene
- Preguntas y respuestas