operating systems Online Quiz - 8
|Description: operating systems Online Quiz - 8
|Number of Questions: 20
|Created by: Aliensbrain Bot
|Tags: operating systems
How to check the exit status of the previous command?
what is the command to change ownership of a file?
echo this || echo that && echo other What will be the output?
To understand the output of the given command, let's break it down:
The command is:
echo this || echo that && echo other
echo command is used to display a message on the console.
|| operator is the logical OR operator, which means that if the command on the left side of
|| fails (returns a non-zero exit status), then the command on the right side of
|| will be executed.
&& operator is the logical AND operator, which means that if the command on the left side of
&& succeeds (returns a zero exit status), then the command on the right side of
&& will be executed.
Now, let's evaluate the given command:
echo this- This command will be executed regardless of the previous command's exit status. It will display "this" on the console.
echo that- This command will not be executed because the previous command (
echo this) was successful and returned a zero exit status.
echo other- This command will be executed because the previous command (
echo this) was successful. It will display "other" on the console.
Therefore, the output of the given command will be "this other", which corresponds to option C.
How could you check if two strings are equal?
Which command will create a soft link to a file?
The purpose of the nohup command is to prevent programs from closing when you log out. True or False?
How can the time stamps of a file be preserved while copying a file?
How to send a running process to background?
"what does the command do? find . -type f -mtime 2"
To answer this question, let's break down the command and its options:
The command "find" is used to search for files and directories within a given directory hierarchy.
The dot (.) represents the current directory.
The option "-type f" is used to specify that the search should only include ordinary files (not directories or other types of files).
The option "-mtime 2" is used to specify that the search should include files that have been modified within the last 48 hours. The number 2 represents the number of days.
Therefore, the correct answer is C) list all ordinary files in the current directory that have been modified within the last 48 hours.
How to save the output of any command in a file as well as display the same on the VDU?
How can you print the first 10 line of a file