Exam Flashcards
True or False?
One of the tasks that an operating system must perform is to manage the resources.
Four resources that an operating system must manage are: the file system,
input/output, processes and memory.
True
The “cd ~” and “cd” commands in Linux will make your home directory
your home directory.
False
The “cat” command can NOT be used to create a file.
False
The “cat” command in Linux can be used to create a file. You can use the “cat > filename” command to create a new file and start entering text into it. The “>” symbol is used to redirect the output of the “cat” command to a file with the specified filename.
In Linux the “..” directory refers to the parent of the current working
directory.
True
The “root directory” in Linux is represented by “\”.
False
False. In Linux, the root directory is represented by the forward slash (“/”) symbol, not the backslash (“”) symbol. The forward slash is used as the directory separator in Linux and UNIX-based systems, while the backslash is used as the directory separator in Microsoft Windows operating systems.
The “rm” command can NOT be used to delete directories.
False. The “rm” command in Linux can be used to delete directories. However, if you try to delete a directory using the “rm” command, you will get an error message stating that the directory is not empty. To remove a directory and its contents, you can use the “rm -r” command, which will recursively remove all files and subdirectories within the specified directory.
The commands “less filename” and “cat filename|less” both accomplish
the same task.
True
Bash has a construct similar to switch in java which is called case and
proper syntax dictates that you must close a case construct with “endcase”.
False. Bash does have a construct similar to a switch statement in Java, which is called the “case” statement. However, in Bash, you do not need to use “endcase” to close a “case” block. Instead, you can use the “esac” keyword to signify the end of a “case” block.
In class we discussed redirection of output and redirection of input. We
use the symbols»_space; and > for redirection of output and < for redirection
of input.
True
nano, vi and sed are examples of editors found on most linux systems that
can be used to create and edit text files.
True
There are two ways to execute a linux script file. One way is to make the file
executable using “chmod” and the second way is to use the “bash” command.
True
. Regex can NOT be used with sed.
False. Regular expressions (regex) can be used with sed, which is a stream editor used for filtering and transforming text.
egrep ‘.$’ science.txt |wc –l will count the number of lines that end with
with a period
True
sed in an interactive editor
False. Sed is not an interactive editor, it is a stream editor used for filtering and transforming text.
ps –l displays all the processes currently running on the system.
True