1.
Command used to create an empty file.
Correct Answer
B. Touch
Explanation
The correct answer is "touch". The touch command is used to create an empty file in Unix and Linux systems. It updates the access and modification timestamps of the file if it already exists, or creates a new empty file if it doesn't exist.
2.
Which is the command used to remove or delete file without confirmation msg?
Correct Answer
B. Rm
Explanation
"rm" this command removes/deleates the file which is not required,but it does not display confirmation message.
3.
"cat" is the command used to
Correct Answer
D. See the contents of file
Explanation
"cat" commands show the complete contents of the file that is being used.
4.
What is the command to delete a file?
Correct Answer
rm
Explanation
The command "rm" is used to delete a file in various operating systems, including Unix and Linux. It stands for "remove" and is followed by the name of the file that needs to be deleted. This command permanently removes the file from the system, and it cannot be recovered once deleted.
5.
What do you type in to move to the parent directory?
Correct Answer
cd ..
Explanation
To move to the parent directory, you need to type "cd .." in the command line. The "cd" command stands for "change directory" and the ".." represents the parent directory. By typing "cd ..", you are instructing the system to move up one level in the directory hierarchy. This is useful when you want to navigate out of the current directory and access files or folders in the parent directory.
6.
What command is used to change directories?
Correct Answer
cd
Explanation
The command "cd" is used to change directories in a command line interface. It stands for "change directory" and allows the user to navigate to a different folder or directory within the file system. By typing "cd" followed by the name or path of the desired directory, the user can switch to that location and access its contents. This command is commonly used in operating systems such as Unix, Linux, and Windows.
7.
What command is used to copy a file?
Correct Answer
cp
Explanation
The command "cp" is used to copy a file. This command allows the user to create a duplicate of a file in a different location or with a different name. By using "cp", the user can easily make backups or create multiple versions of a file without modifying the original.
8.
What command is used to change a file name?
Correct Answer
mv
Explanation
The "mv" command is used to change a file name. This command allows the user to rename a file by specifying the current name of the file and the desired new name. It is commonly used in command line interfaces to manage files and directories. By using the "mv" command, the user can easily modify the name of a file without altering its content or location.
9.
What command is used to change the permissions of a file?
Correct Answer
chmod
Explanation
The command "chmod" is used to change the permissions of a file. This command allows the user to modify the read, write, and execute permissions for the owner, group, and others. By using the appropriate options and parameters with the "chmod" command, the user can easily adjust the file permissions to restrict or grant access as needed.
10.
What is the command to run a program with elevated permissions?
Correct Answer
sudo
Explanation
The command "sudo" is used to run a program with elevated permissions. "sudo" stands for "superuser do" and allows a user with administrative privileges to execute commands as the root user or another user with higher privileges. By using "sudo" before a command, the user is prompted to enter their password, and if authenticated, the command is executed with elevated permissions. This is commonly used in Unix-like operating systems to perform tasks that require administrative access, such as installing software or modifying system files.
11.
What is the command to delete a file?
Correct Answer
rm
Explanation
The command "rm" is used to delete a file.
12.
What command creates an empty directory?
Correct Answer
mkdir
Explanation
The command "mkdir" is used to create a new directory in a file system. When this command is executed, it creates an empty directory with the specified name. This allows users to organize their files and folders in a structured manner. By using "mkdir", users can easily create a blank directory without any files or subdirectories inside it.
13.
What command is used to copy a file?
Correct Answer
cp
Explanation
The command "cp" is used to copy a file. It stands for "copy" and is a commonly used command in Unix-based operating systems. By using the "cp" command followed by the name of the file to be copied and the destination directory, the file is duplicated and saved with the same name in the specified location. This command is essential for creating backups, duplicating files, or transferring them to different directories.
14.
What command shows you what directory you are in?
Correct Answer
pwd
Explanation
The command "pwd" stands for "print working directory" and it is used to display the current directory that the user is in. By typing "pwd" in the command line, the user can see the full path of their current directory, allowing them to easily navigate and understand their file system structure.
15.
.............is the command used to create a new directory.
Correct Answer
A. Mkdir
Explanation
The command "mkdir" is used to create a new directory.
16.
What command clears the contents of your terminal display?
Correct Answer
clear
Explanation
The "clear" command is used to clear the contents of the terminal display. This command is commonly used when the screen becomes cluttered with previous commands and outputs, and the user wants to start with a clean slate. By typing "clear" and pressing enter, the terminal screen will be cleared, making it easier to read and navigate.
17.
What command creates an empty directory?
Correct Answer
mkdir
Explanation
The "mkdir" command is used to create a new directory in a file system. By typing "mkdir" followed by a directory name, an empty directory with that name will be created. This command is commonly used in command line interfaces to organize files and folders.
18.
What command is used to display your previous commands?
Correct Answer
up arrow, Up arrow, history
Explanation
The up arrow, Up arrow, and history commands are used to display previous commands. By pressing the up arrow key, you can cycle through your command history and view the commands you have previously entered. Similarly, the Up arrow key performs the same function. The history command can be used to display a list of all the commands you have entered in the current session. These commands are useful for quickly accessing and reusing previous commands without having to retype them.