Search Header Logo

Linux Commands and Scripting Quiz

Authored by Naveen Yadav

Other

12th Grade

Used 6+ times

Linux Commands and Scripting Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Anika is trying to secure her personal project folder on her computer. She wants to ensure that only she can read, write, and execute the files in that folder, while preventing anyone else from accessing it. What does the chmod 700 command do?

Sets the permissions to read-only for all users.

Gives the owner all permissions and restricts others.

Allows anyone to execute the file.

Deletes the file.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Dhruv is trying to understand the file permissions on his Linux system. Which command should he use to check the file permissions?

ls -a

ls -l

chmod

touch

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Shaan is learning about file permissions in his computer science class. He comes across a command called umask. What is the purpose of the umask command?

To mask user credentials.

To set default file permissions.

To encrypt files.

To manage file ownership.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Aarav is trying to manage the server configuration files and needs to find all .conf files owned by root. Which command would he use?

find / -name '*.conf' -user root

grep -r '.conf' /root

chmod 777 *.conf

ls -a *.conf

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Aditi is managing the server logs on her Linux machine. She wants to clean up the log files that are no longer needed. She runs the following script: bash Copy code #!/bin/bash find /var/log -type f -mtime +30 -exec rm {} \;

Deletes all files older than 30 minutes in /var/log.

Deletes all directories in /var/log.

Deletes all files older than 30 days in /var/log.

Finds and lists all files in /var/log.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Dhruv wants to ensure that only the root user can modify a sensitive configuration file on his server. Which command should he use?

chmod 777

chmod 600

chmod 400

chmod 700

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Sneha wants to schedule a shell script to run daily at midnight. How can she do this?

Use the at command.

Add an entry to /etc/crontab.

Use systemctl to enable it.

Run it manually every day.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?