Unix Question Set Done
Unix Question Set Done
ls -h ls -a ls -l ls -x ls -p
Question 2 of 40 You are currently placed in "trng" directory placed under the directory "training". The command to move the file "file1" from "trng" directory to "data" directory placed under the directory "training" is: mv file1 data mv file1 data/. mv file1 ../data/. mv ../file1 ../data/. mv file1 /data/.
Question 3 of 40 What is the output the following command: % sort -t "|" +3 -5 Students The records will be sorted based on 4th to 5th columns The records will be sorted based on 3rd and 5th columns The records will be sorted based on 3rd to 5th columns The records will be sorted based on 3rd to 4th columns
Question 4 of 40 To save a file without quitting the vi editor is done using the command :q :w :w! :wq :q!
Question 5 of 40 Which are the different ways knowing more about the command man help information All of the above
Question 6 of 40 You have a file with numerical data in it (i.e file with list of numbers in it). To sort this data which command/method you will prefer most. Assume that list is reasonably small and Quick output is high priority. sort sort n Write a C/C++ program. Use quick sort. Write a C++ program. Use STL sort algorithm
Question 7 of 40 What is the output of the following command: $rmdir dir1 dir1/dir2/dir3 deletes dir1 and dir3 directories deletes dir1 directory deletes dir1 dir2 and dir3 directories error Question 8 of 40 Which of the following escape sequences can be used to keep the cursor on the same line after displaying the output with echo command ? \a \b \c \k None of the above Question 9 of 40 If there are 5 files in the current directory and if ls -l | wc -l command is given in the current directory, then the output of this command will be 5 all the filenames will be displayed 6 all the lines of all the 5 files. syntax error will be displayed Question 10 of 40 Unix file system has which of the following file structure Tree Structure StandardStructure HierarchicalStructure None of the above Question 11 of 40 Which unix command gives the number of lines , words and characters. cat ls wc grep filename Question 12 of 40 Which of these expressions shows the proper way to add the directory /usr/bin to your path? PATH+=/usr/bin PATH=/usr/bin $PATH:/usr/bin PATH=$PATH:/usr/bin Question 13 of 40 Which of the following represents an absolute path? ../home/abc.txt bin/cat abcd/ /usr/bin/cat
Question 14 of 40 Which option of "mkdir" command allows you to create sub-directories in one single statement w -w p -p None of the above Question 15 of 40 State TRUE/FALSE:When you log in, the current directory is set to home directory. TRUE FALSE
Question 16 of 40 __________ is the command to append into the contents of a file cat>filename cat>>filename catcat>>>filename Question 17 of 40 The command used to slice the files horizontally is cut paste head cat Question 18 of 40 ln -s <filename>< linkfile> will create ----- link to the file soft link symbolic link hard link both 1 and 2 Question 19 of 40 Which option of sort allows you to sort data in descending order. -r -o -f None of the above Question 20 of 40 who | wc l : What is the output of the following command if 10 users are connected? It will display the list of all the users connected. It will display an error in the command 10 None of the above Question 21 of 40 Which of the following pieces of information is not contained in the passwd file? A users unencrypted password A users login name
Question 22 of 40 In the following command: $paste -d ":" Student1 Student2 -d stands for define -d stands for differnece -d stands for delimeter None Question 23 of 40 What is the output of the following Command : $ls -R | wc - lw >SampleFile The output of ls command is stored in SampleFile The output of wc command is stored in SampleFile The output of ls is treated as input to wc and the count is stored in SampleFile The output of ls is treated as input to wc and the count is displayed and stored in SampleFile Question 24 of 40 Which option of grep displays the count of lines matching the pattern -c -nc -v -lc -ln Question 25 of 40 When do we use the command, ps e List full process showing the PPID Display All processes including user and system processes Dipslay Processes of User Displaying all Users processes. Question 26 of 40 In the vi editor to delete a char h j x k l Question 27 of 40 Which of these commands will set the permissions on file textfile to read and write for the owner, read for the group, and nothing for everyone else? chmod 046 textfile chmod 640 textfile chmod 310 textfile chmod rw r nil textfile Question 28 of 40 You can always return to your home directory by using the command cd / cd \
cd HOME cd .. cd Question 29 of 40 Which of the following commands will display the details of directories only of the current directory ? ls -d ls -l | grep "d$" ls -l | grep "^d" ls -l | grep "d^" ls -l | grep "$d" Question 30 of 40 State TRUE/FALSE: Using 'mv' command can we rename a file TRUE FALSE Question 31 of 40 Which of the following represents an absolute path? ../home/abc.txt bin/cat abcd/ /usr/bin/cat Question 32 of 40 What command do you use to copy files from all sub directories to another directory $cp -r Dir1 Dir2 $cp -i Dir1 Dir2 $cp -a Dir1 Dir2 $cp -m Dir1 Dir2 Question 33 of 40 Which option of ls will allow you to display the files in reverse order. r -r R -R None of the above Question 34 of 40 In unix grep-n command displays the Line mattchingthe pattern alongwith its line number Only a count of the linethat match a pattern Printsout all thoselines that do not match thepattern None of the above Question 35 of 40 You are currently placed in "data" directory placed under the directory "training". The command to copy the file "file1" from "data" directory to "trng" directory placed under the directory "training" is: cp file1 ../trng/. cp file1 /trng/. cp ../file1 ../trng/.
Question 36 of 40 Kernel Manages Entire resources of the system Schedules the work done by the CPU Enforces the security scheme a &b b&c ab&c Question 37 of 40 What would happen when a user executes the following command and enters the details as shown below? $ cat<test1 <enter> The cat command will take each line of the file test1 as input and display it on VDU. The cat command will take each line of the file test1 as Output and display it on VDU. None of the above Question 38 of 40 What is the command to Print the searched pattern with the line numbers in File1 $grep -N "Accenture" File1 $grep -nv "Accenture" File1 $grep -n File1 $grep -n "Accenture" File1 All are correct None Question 39 of 40 Which character must be specified at the end of the command in order to execute that command in the background ? & ^ % $ # Question 40 of 40 What is the output of the following command $ cat File1>File2>File3 Copies the contents from File1 to File2 and File3 It is a wrong command - gives error Copies File1 contnets to File3 Copies File1 to File3 and creates an empty file File2 None of them