You are on page 1of 7

I.

)Explain about commands given below : ssh , telnet, scp , sftp , ftp, ifconfig, whois , ping , traceroute ,grep , find , diff ssh: Secure Shell client (remote login program)
telnet: user interface that communicates with remote system using telnet protocol. telnet hostname Connects to the remote host. Scp: Secure copy (remote file copy) Sftp: Secure File Transfer Program ftp:file tranfer protocol. Ifconfig: Configure a network interface Whois: whois command lists the information about the domain owner of the given domain. Ping:test a network connection. Traceroute:track root to host. Grep: Search file(s) for lines that match an extended expression. Find: Search for files that meet a desired criteria Diff:display the difference between two files.

2) Write a shell script to connect to MYSQL Database and display all the tables and a specific record in any table. A. Command=`mysql B D $DBDATABASE u $DBPASSWORD e database commands` Print $command II.) Multiple choice questions: 1)Which command is used to display all the files? A. ls B. cat C. ls -a D. type E. dir 2) How do you get help about the command cp? A. help cp B. man cp C. cp 3) Which command is used to modify the access time of a file? A. chmod B. chown C. touch D. cd E. grep 4)What option can you use with the Unix "ls" command to display file attributes? A. "-d"

B. C. D.

"-a" "-l" "-x"

5)To set the default permission flags for new files in a directory to "only owner has access," what Unix command would you use? A. umask 733 B. umask 700 C. umask 033 D. umask 077 6) How do you rename a file from new to old? A. B. C. mv new old cp new old rn new old

7) How do you display the contents of a file myfile.txt? A. B. C. D. type myfile.txt list myfile.txt less myfile.txt cat myfile.txt

8) How do you create a new directory called flower? A. B. C. newdir flower mkdir flower crdir flower

9) What is the command to search all files in your current directory for the word plasmodium? A. B. C. grep plasmodium * find plasmodium -all lookup plasmodium *

10)How do you rename file "new" in file "old"? A. B. mv new old cp new old

C.

rn new old

11)What does cd .. do? A. B. C. D. Not a valid UNIX command Logs out of the computer Changes the working directory to the login directory Changes the working directory to the parent of the current working directory

12)What is the correct command to list all files including invisible ones? A. B. C. D. ls -i ls -a ls -all listfiles all

13)Command to change owner of the file in UNIX. A. B. C. D. chowner chown Both None

14)What is the purpose of the shell? A. B. C. D. The shell keeps the end users from accessing the kernel for security reasons. The shell protects the kernel from the shortcomings of the user. The shell allows the user to do things that the kernel could not accommodate. All of above

15)How do you delete a file? A. B. C. D. touch filename rm filename less filename dl filename

16)How can you append the output of a command to a file?

A. B. C. D. E.

command > file command < file command << file command <> file command >> file

17)What does the command ls do? A. B. C. D. Display of the contents of a file Display of files and folders, present in the folder where you are Opening a file Shows a calendar

18)With what can you stop a process? A. B. C. D. Kill Delete Shutdown Stop

19)With what command you can see what folder you are in? A. B. C. D. pwd place whereami map

20)Which command is used to change protection mode of files starting with the string emp and ending with 1,2, or 3? A. B. C. D. E. chmod u+x emp[l-3] chmod 777 emp* chmod u+r ??? emp chmod 222 emp? None of the above

21)Which of the following commands is used to display the directory attributes rather than its contents? A. B. C. D. E. ls -1 -d ls -1 ls -x ls -F None of the above

22)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: A. B. C. D. E. 000 755 744 555 None of the above

23)Which of the following is not a communication command. A. B. C. D. E. write mesg mail grep None of the above

24)Which symbol is used to separate more than one command in the same command line? A. B. C. D. $ # : ;

E.

None of the above

25) Which command is used to display the characteristics of a process? A. B. C. D. E. pid du ps au None of the above

26)Which command is used to display and create files? A. B. C. D. E. cat vi ed lyrix None of the above

27)The command used to compare the files is known as A. B. C. D. E. comp cmp do ccp None of the above

28)Which commands is used to assign executable permission to all of the files named "letter"? A. B. C. D. E. chmod ugo+r letter chmod ugo+rw letter chmod u+x letter chmod ugo+x letter None of the above

29)The command to count the number of files in the current directory by using pipes, is A. ls | wc

B. C. D. E.

ls -l | ws -l ls | wc -w ls | ws -c None of the above

30)Which of the following commands can be used to get information about all users who are currently logged into the system? A. B. C. D. E. which who who am i 1 /u None of the above

You might also like