ExamVeda
Login
Home
31
Which option is used with rm command to make the command prompt the user with each filename and a ?, before acting on it
Discuss
Answer & Solution
Answer: Option C
Solution:
In Unix, the rm command is used to remove files or directories. The -i option prompts the user for confirmation before deleting each file. When this option is used, rm will display the filename followed by a question mark (?), and the user needs to confirm by typing 'y' for yes or 'n' for no.
So, -i is the option used with the rm command to prompt the user with each filename and a question mark before acting on it.
32
Which of the following directories contain all the Alias created by a user, including his login directory?
Discuss
Answer & Solution
Answer: Option E
Solution:
The correct answer is Option E: None of the above.
In Unix, the directory that contains all the aliases created by a user, including their login directory, is typically the user's home directory. By default, aliases are usually stored in a user's configuration files such as .bashrc or .bash_profile located in their home directory.
Therefore, None of the above options is the correct directory for storing user aliases.
33
Which of the following commands is used to obtain a list of all files by modification time?
Discuss
Answer & Solution
Answer: Option B
Solution:
In Unix, the ls command is used to list directory contents. The -t option with ls is used to sort files by modification time, showing the most recently modified files first.
So, ls -t is the command used to obtain a list of all files sorted by modification time.
34
The % key allows you
Discuss
Answer & Solution
Answer: Option A
Solution:
In Unix terminal environments, the % key, when used with certain text editors like vi or vim, allows the cursor to jump to the matching delimiter (such as parenthesis, bracket, or brace) in the text. This feature helps in navigating through code or text files efficiently, especially in programming or scripting contexts.
So, Option A is the correct description of what the % key allows you to do.
35
Which command is used to display the characteristics of a process?
Discuss
Answer & Solution
Answer: Option C
Solution:
In Unix, the ps command is used to display information about active processes. By default, it shows a brief list of processes running in the current terminal session, including their process IDs (PIDs), terminal IDs (TIDs), and other characteristics such as CPU and memory usage.
So, ps is the command used to display the characteristics of a process.
36
Which of the following commands is used to identify the type of file by context?
Discuss
Answer & Solution
Answer: Option C
Solution:
In Unix, the file command is used to determine the type of a file by examining its contents and context. When you run file followed by a filename as an argument, it analyzes the file and provides information about its type, such as whether it is a text file, binary file, directory, symbolic link, etc.
So, file is the command used to identify the type of file by context.
37
The field separator in cut command is specified with
Discuss
Answer & Solution
Answer: Option B
Solution:
In Unix, the cut command is used to extract sections from each line of input. The field separator, which specifies how the fields are separated in the input, is specified using the -d option followed by the delimiter character. For example, if you want to use a comma as the field separator, you would use cut -d','.
So, -d option is used to specify the field separator in the cut command.
38
Which of the following options will be used to display number of blocks used by a file?
Discuss
Answer & Solution
Answer: Option D
Solution:
In Unix, the du command is used to estimate file space usage. The -s option, when used with du, displays only a summary of the disk usage, including the total number of blocks used by a file or directory.
So, -s is the option used to display the number of blocks used by a file.
39
Which option will be used with touch command to change the access time?
Discuss
Answer & Solution
Answer: Option A
Solution:
In Unix, the touch command is used to change file timestamps, including access (atime) and modification (mtime) times. The -a option, when used with touch, updates only the access time of the file to the current time without modifying the file's content.
So, -a is the option used with the touch command to change the access time of a file.
40
Which command is used to make all files and sub-directories in the directory (progs) executable by all users?
Discuss
Answer & Solution
Answer: Option A
Solution:
In Unix, the chmod command is used to change the permissions of files and directories. The -R option is used to recursively change permissions for the specified directory and its subdirectories. The a+x part of the command grants execute permission to all users (owner, group, and others). So, chmod -R a+x progs makes all files and subdirectories in the progs directory executable by all users.
Therefore, Option A is the correct command to achieve the desired task.