Linux File System and Basic Commands Quiz

InstrumentalLlama avatar
InstrumentalLlama
·
·
Download

Start Quiz

Study Flashcards

10 Questions

What command is used to list the content of the current directory in long format?

ls -l

Which command is used to remove a file in Linux?

rm [file_name]

What command is used to make a new directory in Linux?

mkdir [directory_name]

Which command is used to move a file to a directory in Linux?

mv [file_name] [directory_name]

What command is used to change the directory to the parent directory in Linux?

cd ..

What is the result of the variable value assignment gpa = 3.3 * 0.32 + 4 * 0.5 + 2.7 * 0.08 + 3 * 0.1?

3.532

What does the code 'count = count + 1' do?

Increments the value of count by 1

Which variable naming convention is recommended in Python?

miles = 100 gasGallons = 0.2 usedGas = miles * gasGallons

What is the result of the expression P = M*G when M = 100 and G = 0.2?

$P = 20$

What does the term 'order of precedence' refer to in programming?

The sequence in which operations are evaluated in an expression

Study Notes

Linux Commands

  • The ls -l command is used to list the content of the current directory in long format.
  • The rm command is used to remove a file in Linux.
  • The mkdir command is used to make a new directory in Linux.
  • The mv command is used to move a file to a directory in Linux.
  • The cd .. command is used to change the directory to the parent directory in Linux.

Variable Assignments

  • The variable value assignment gpa = 3.3 * 0.32 + 4 * 0.5 + 2.7 * 0.08 + 3 * 0.1 results in the calculation of the GPA score.
  • The code count = count + 1 increments the value of the count variable by 1.

Python Variable Naming

  • The recommended variable naming convention in Python is not specified, but it's generally recommended to use descriptive and concise names, following the PEP 8 style guide.

Mathematical Expressions

  • The result of the expression P = M*G when M = 100 and G = 0.2 is P = 20.
  • The term 'order of precedence' in programming refers to the rules that govern the order in which operations are performed when multiple operators are used in an expression.

Test your knowledge of the Linux file system and basic commands with this quiz. Topics include the root directory, user home directories, and essential commands such as 'pwd' and 'ls'.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Linux File Ownership Commands Quiz
3 questions
Linux Midterm  Review 1
21 questions

Linux Midterm Review 1

LuxuryAbundance avatar
LuxuryAbundance
Linux Midterm Review 2
30 questions

Linux Midterm Review 2

LuxuryAbundance avatar
LuxuryAbundance
Use Quizgecko on...
Browser
Browser