💻 Computing Solved MCQs with Answers

Practice 1954 approved 💻 Computing questions with verified answers from the 💾 Computer Science subject for Pakistan exams.

1954 solved MCQs

Which command is used to sort the lines of data in a file in reverse orderAnswer: sort -r Which command is used to display the top of the file?Answer: head Which command is used to copy all files having the string chap and any two characters after that to the progs directory?Answer: cp chap?? progs Which command is used to change protection mode of files starting with the string emp and ending with 1,2, or 3?Answer: chmod u+x emp[1-3] Which command is used to remove a directory?Answer: rmdir Which of the following keys is used to replace a single character with new text?Answer: s Which command is used to extract specific columns from the file?Answer: cut Which command sends the word count of the file infile to the newfile.Answer: wc infile >newfile Which command is used to remove the read permission of the file 'note' from both the group and others?Answer: chmod go-r note Which of the following commands is used to display the directory attributes rather than its contents?Answer: ls -l -d Which of the following files will displayed by this command cat *ch*Answer: All of the above The Octal number to be given alogn with chmod command to make a file readable, writable and executable to the owner, readable and executable to group and others is:Answer: 755 If you are to use [Control-c] as the interrupt key instead of [Del], then you will have to useAnswer: stty intr \^c Which of the following is not a communication command.Answer: grep Which of the following keys is used to move the cursor to the end of the paragraph.Answer: } Which command is used to concatenate all files beginning with the string 'emp' and followed by a non-numeric characters?Answer: cat emp[!0-9] The command which transcribes the standard input to the standard output and also makes a copy of the same in a file isAnswer: tee Which command is used to remove a file?Answer: rm Which symbol is used to separate more than one command in the same command line?Answer: ; The agency that sits between the user and the UNIX system is called theAnswer: shell Which of the following commands is used to update access and modification times of a file?Answer: touch Which command is used to count just the number of characters in a file?Answer: wc -c Which of the following commands is used to list contents of directories?Answer: ls Which command is used to display a file contents in octal form?Answer: od Which command will be used with vi editor to insert text to left of cursor?Answer: i In vi editor, forward search is performed using the command.Answer: /pat Which of the following special shell variables is used to process number of the last background job?Answer: $! Which option will be used with ps command to show the entire command line of the process being run?Answer: -f Which of the following command addresses all users who are currently hooked on?Answer: wall Which option is used with rm command to make the command prompt the user with each filename and a ?, before acting on itAnswer: -i