Podcast
Questions and Answers
What is the syntax for command substitution in Bash?
What is the syntax for command substitution in Bash?
How can you check if a file exists in a Bash script?
How can you check if a file exists in a Bash script?
What is the command to change the group of a file in Linux?
What is the command to change the group of a file in Linux?
What does the date
command do in Linux?
What does the date
command do in Linux?
Signup and view all the answers
What does the -w
permission allow in Linux file permissions?
What does the -w
permission allow in Linux file permissions?
Signup and view all the answers
Study Notes
MCQs on Linux
Bash Scripting
- What is the syntax for command substitution in Bash?
a)
$(command)
b)\
(command) c)command
d)(command)
Linux Security
- How can you check if a file exists in a Bash script?
a)
[ -e $file ]
b)[ ! -e $file ]
c)if [ -e $file ]
d)if [ ! -e $file ]
Linux Groups
- How do you change the group of a file in Linux?
a)
chgrp group2 <file>
b)chown group2 <file>
c)chmod group2 <file>
d)chown group2:group2 <file>
Command Substitution
- What does the command
date
do in Linux? a) It displays the current date. b) It displays the current time. c) It displays the current system information. d) It displays the current user information.
File Permissions
-
What is the default permission for a newly created file in Linux? a)
rwxrwxrwx
b)rwx--x--x
c)rw-rw-rw-
d)r--r--r--
-
What does the
-w
permission allow in Linux file permissions? a) Write access to the file b) Read access to the file c) Execute access to the file d) None of the above
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Test your knowledge of Linux Bash scripting, security, and file permissions with this quiz. Questions cover command substitution syntax, file existence checking, group manipulation, command functions like date, default file permissions, and understanding file permission settings.