4 Jan # Quiz # Shift 2

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Saurabh220837
S
Saurabh220837
Community Contributor
Quizzes Created: 1 | Total Attempts: 375
| Attempts: 375 | Questions: 17
Please wait...
Question 1 / 17
0 %
0/100
Score 0/100
1. Which of this is not the use of cat command --

Explanation

The cat command is primarily used to display the content of a file, write to a file, and append to a file. However, it cannot be used to directly list the contents of a file. To list the contents of a file, the ls command is typically used.

Submit
Please wait...
About This Quiz
4 Jan # Quiz # Shift 2 - Quiz

This quiz titled '4 Jan # Quiz # Shift 2' assesses knowledge of Unix command line operations. It covers commands for directory navigation, file permissions, text manipulation, and... see moreprocess management. Essential for learners aiming to enhance their Unix shell proficiency. see less

2. Command to find the current working directory is 

Explanation

The correct answer is "pwd". The "pwd" command stands for "print working directory" and is used to display the current working directory in the command line interface. It is a useful command when navigating through directories or when you need to know the exact location of your current directory.

Submit
3. What command do you have to use to go to the previous directory?

Explanation

To go to the previous directory, you need to use the "cd -" command. This command allows you to switch back to the directory you were previously in. It is a useful shortcut when navigating between directories, especially when you need to quickly switch between two directories.

Submit
4. Which command is used to extract specific columns from the file?

Explanation

The command "cut" is used to extract specific columns from a file. It allows users to select specific fields or columns from a file or input stream and display them. This can be useful for extracting specific data or information from a large dataset or file.

Submit
5. By default, how many lines does head show

Explanation

The default behavior of the "head" command in most operating systems is to display the first 10 lines of a file. This means that when you run the "head" command without specifying a number of lines, it will show you the first 10 lines of the file.

Submit
6. How can Piping be represented by a character.

Explanation

The character "|" can represent piping in a command line or programming language. Piping allows the output of one command to be used as the input of another command. The "|" character is used to connect the output of one command to the input of another command, creating a flow of data between them. This allows for the chaining of commands together, enabling more complex and powerful operations to be performed.

Submit
7. Command to erase all files in the current directory, including all its sub-directories, using only one command?

Explanation

The correct answer is "rm -r *". This command uses the "rm" command with the "-r" option to recursively remove all files and directories in the current directory. The "*" wildcard is used to match all files and directories in the current directory, including its sub-directories. This command effectively erases all files in the current directory and its sub-directories in one command.

Submit
8. We need to use the ________ option in sort command to sort on a certain column.

Explanation

To sort on a certain column using the sort command, we need to use the "-k" option. The "-k" option allows us to specify the column number or range of columns to sort on. By using this option, we can ensure that the sort command organizes the data based on the specified column, making it easier to analyze and work with the data.

Submit
9. Which command is used to sort the lines of data in a file in reverse order

Explanation

The correct answer is "sort -r". The "sort -r" command is used to sort the lines of data in a file in reverse order. The "-r" flag stands for reverse, indicating that the sorting should be done in descending order instead of the default ascending order. This command is commonly used in Unix-like operating systems to arrange data in reverse order based on a specific criterion, such as alphabetical order or numerical value.

Submit
10. The command to revoke read permission from owner of file is 

Explanation

The command "chmod u-r" is used to revoke read permission from the owner of a file. The "u" in the command refers to the user, and the "-r" option indicates the removal of the read permission. This command specifically targets the owner of the file and removes their ability to read the file's contents.

Submit
11. The command used to find the process running on a shell is -

Explanation

The command "ps" or "PS" is used to find the process running on a shell. It is a common command in Unix-like operating systems that displays information about the currently running processes. By executing this command, users can view details such as process ID (PID), CPU and memory usage, and other relevant information. The "ps" command is essential for system administrators and users to monitor and manage processes effectively.

Submit
12. The command used to list all files in a directory

Explanation

The command "ls" is used to list all files in a directory. It is case-sensitive, so both "ls" and "LS" are correct answers.

Submit
13. What does the following command would do - 
cp ../file

Explanation

The command "cp .. /file" is used to copy the file from the parent directory to the current directory. The ".." represents the parent directory, and "/file" specifies the file to be copied.

Submit
14. Which command is used to remove the read permission of the file 'note' from both the group and others?

Explanation

The command "chmod go-r note" is used to remove the read permission of the file 'note' from both the group and others. This command changes the permissions of the file by removing the read permission (r) for both the group (g) and others (o).

Submit
15. Command to translate text from lower case to upper case letter is 

Explanation

The correct answer is "tr '[:lower:]' '[:upper:]'". This command uses the 'tr' utility in Unix to translate text from lower case to upper case letters. The '[:lower:]' specifies the set of lower case letters, and '[:upper:]' specifies the set of upper case letters. By using this command, any lower case letters in the text will be replaced with their corresponding upper case letters.

Submit
16. Match the following
Submit
17. Match the following
Submit
View My Results

Quiz Review Timeline (Updated): Mar 18, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 18, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jan 04, 2018
    Quiz Created by
    Saurabh220837
Cancel
  • All
    All (17)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Which of this is not the use of cat command --
Command to find the current working directory is 
What command do you have to use to go to the previous directory?
Which command is used to extract specific columns from the file?
By default, how many lines does head show
How can Piping be represented by a character.
Command to erase all files in the current directory, including all its...
We need to use the ________ option in sort command to sort on a...
Which command is used to sort the lines of data in a file in reverse...
The command to revoke read permission from owner of file is 
The command used to find the process running on a shell is -
The command used to list all files in a directory
What does the following command would do -  cp ../file
Which command is used to remove the read permission of the file...
Command to translate text from lower case to upper case letter...
Match the following
Match the following
Alert!

Advertisement