Recent comments

red hat linux questions and answers




1.You work as a Network Administrator for McNeil Inc. The company has a Linux-based network. A printer is configured on the network. You want to remove a file from a print queue. Which of the following commands will you use to accomplish this?

A)       LPR
B)        LPQDEL
C)       LPRM
D)       LPQ

Answer: C

2.You are a newly appointed Red Hat Technician for company Inc. The company has a Linux-based network. You want to install a package named httpd on your Linux system. Before installing the package, you want to get the list of those packages that httpd depends on. Which of the following commands will you use to accomplish the task?

A)       rpm deplist httpd
B)       yum deplist httpd
C)       yum list httpd
D)       rpm -qR httpd

Answer: B

3.You work as the Network Administrator for McNeil Inc. The company has a Linux-based network.You are working as a root user on Red Hat operating system. You are currently running a program named My_program. You are getting some error messages while executing the program. You want to redirect these error messages to a file named file2 rather than being displayed on the screen. Which of the following tools should you use to accomplish the task?

A)       My_program >> file2
B)        My_program 2> file2
C)       My_program 2>> file2
D)       My_program > file2

Answer: B

4.Which of the following key-combinations is used to redo a change undone by a u command in vim?

A)       Ctrl-w, Arrow
B)       Ctrl-w, s
C)       Ctrl-r
D)       Ctrl-w, v

Answer: C

5.You work as the Network Administrator for Perfect solutions Inc. The company has a Linux-based Network. You are working as a root user. You want to know what the day will be on 20 July 2010.Which of the following commands should you use to accomplish this task?

A)       cal
B)       cal 20 July
C)       cal 7 2010
D)       date

Answer: C

6.Which of the following commands is used to access Windows resources from Linux workstation?

A)       rsync
B)        mutt
C)       scp
D)       smbclient

Answer: D

7.You want to temporarily change your primary group to another group of which you are a member. In this process, a new shell will be created, and when you exit the shell, your previous group will be reinstated. Which of the following commands will you use to accomplish this task?

A)       chmod
B)        newgrp
C)       chgrp
D)       chown

Answer: B

8.Fill in the blank with the required permission to complete the statement below. In order to make a script executable in a Linux computer, you must assign the___________ permission to the script file.

A)       execute
B)       read
C)       read & write
D)       write

Answer: A

9.You work as a Network Administrator for McNeil Inc. The company has a Linux-based network. David, a Sales Manager, wants to know the name of the shell that he is currently using. Which of the following commands will he use to accomplish the task?

A)       ECHO $shell
B)       RM $shell
C)       MV $shell
D)       LS $shell

Answer: A

10.     Which of the following text editing tools can be used to edit text files without having to open them?

A)       less
B)       sed
C)       vi
D)       more

Answer: B

11.     Which of the following commands will you run to do case-sensitive search for files named
foobar.png?

A)       locate -name foobar.png
B)       find -iname foobar.png
C)       grep-name foobar.png
D)       find -name foobar.png

Answer: D

12.     You work as the Network technician for McNeil Inc. The company has a Linux-based Network. You are working on the Red Hat operating system. You want to remove some write protected files and directories. Which of the following commands should you use to accomplish this task?

A)       rm -rf
B)       rm -f
C)       rmdir
D)       rm

Answer: A

13.     Which of the following options is used with aspell to specify the location of the main word list?

A)       d,--master=string
B)       -p,--personal=file
C)       --jargon=string
D)       --dict-dir=dir

Answer: D

14.     Which ftp client command allows you to upload multiple files simultaneously using the "*" wildcard?

A)       mput
B)       mget
C)       put
D)       get

Answer: A

15.     Which of the following commands copies files between hosts on a network and uses the same authentication as ssh, and will ask for passwords or passphrases if they are needed for
authentication?

A)       scp
B)       rcp
C)       cp
D)       mv

Answer: A

16.     John works as a Network Administrator for Perfect Solutions Inc. The company has a Linux-based network. John is working as a root user on the Linux operating system. He wants to break a data.txt file, 200MB in size, into two files in which the size of the first file named data .txt.aa should be150MB and that of the second file named data.txt.ab should be 50MB. To accomplish his task and to further delete the data.txt file, he enters the following command: split --verbose -b 150m data.txt data.txt. ; rm -vf data.txt Which of the following commands can John use to join the splitted files into a new data.txt file?

A)       vi data.txt.*
B)       less data.txt.* > data.txt
C)       cat data.txt.* > data.txt
D)       vi data.txt.* > data.txt

Answer: C

17.     Mark is a newly appointed Network Technician for McNeil Inc. The company has a Linux-based network. He is working on the Red Hat operating system. He wants to sort a file named marketing.txt in the reverse alphabetical order. Which of the following commands should Mark use to accomplish this task?

A)       sort -u marketing.txt
B)        sort marketing.txt
C)       sort -n marketing.txt
D)       sort -r marketing.txt

Answer: D

18.     Which of the following commands is used to securely copy files from one host to another over the network?

A)       ls
B)        cat
C)       mutt
D)       scp

Answer: D

19.     Fill in the blank with the appropriate tool. __________ is a public domain collection of tools to  allow Unix systems to manipulate MS-DOS files: read, write, and move around files on an MSDOS file system.

A)       mtools
B)       ntools
C)       xtools
D)       tools

Answer: A

20.     Which of the following commands will you use to list all local and remote printers attached to your computer?

A)       lpq
B)       lpstat -d
C)         lpstat -t
D)       lpr

Answer: C

21.     Which of the following files is the default configuration file of XDM (X Window Display Manager)?

A)       /etc/X11/xdm/xdm-config
B)        $HOME/.Xauthority
C)       /usr/bin/xdm-config
D)       /usr/bin/xterm

Answer: A

22.     Which of the following commands is used to append the list of files in the /tmp directory to an existing file named deletelater.txt?

A)       ls /tmp > deletelater.txt
B)       ls deletelater.txt /tmp
C)       ls /tmp deletelater.txt
D)       ls /tmp >> deletelater.txt

Answer: D

23.     You work as a Technician for Net World Inc. The company has a Linux-based network. You have configured a file server on the company's etwork. You want to summarize disk usage of each file in a particular directory on the file server. Which of the following commands will you use?

A)       du
B)        fsck
C)       df
D)       dfsck

Answer: A

24.     You work as the Network Administrator for Perfect Solutions Inc. The company has a Linux-based network. You are a root user on the Red Hat operating system. You want to keep an eye on the system log file /var/adm/messages. Which of the following commands should you use to read the  file in real time?

A)       tail -f /var/adm/messages
B)       tail /var/adm/messages
C)       cat /var/adm/messages
D)       tail -n 3 /var/adm/messages

Answer: A

25.     You work as the Network Administrator for Tech Perfect Inc. The company has a Linux-based  network. You are working as a root user on the Linux operating system. You have created a file in  the vim text editor. You want to save this file and exit it. Which of the following keys should you  use to accomplish the task?

A)       :w
B)        :wq
C)       :q!
D)       :

Answer: B

26.     Which of the following commands is used to change file access permissions in Linux?

A)       chown
B)       chmod
C)       chperm
D)       chgrp

Answer: B

27.     You work as a Network Administrator for Rick International. The company has a Linux-based network. A process is running on a server. It is using a lot of processing power. You want the process to use less resource. Which of the following actions will you perform to accomplish the  task?

A)       Kill the process and rerun it by using the nice command with the -n 1 switch.
B)        Kill the process and rerun it by using the nice command with the -n 19 switch.
C)       Kill the process and rerun it by using the fg command.
D)       Kill the process and rerun it by using the bg command.

Answer: B
28.     Which of the following commands list the configured printers in a Linux network? Each correct  answer represents a complete solution. Choose all that apply.

A)       lpstat -a
B)       lpstat -l
C)       lpstat -o
D)       lpstat -r

Answer: A,B

29.     John works as a Network Administrator for Perfect Solutions Inc. The company has a Linux-based network. John is working as a root user on the Linux operating system He wants to change the group membership of the file foo to group bar. Which of the following commands will he use to  accomplish the task?

A)       chgrp foo bar
B)        chgroup bar foo
C)       chgrp bar foo
D)       chgroup foo bar

Answer: C

30.     Which of the following commands is used to view the PDF files in Linux?

A)       ps2pdf
B)       a2ps
C)         pdf2ps
D)       evince

Answer: D

31.     You work as a Network Administrator for Perfect Solutions Inc. The company has a Linux-based network. You want to view the status of the current processes running on a Linux computer. You also want to append this information into the StatPro.txt file without deleting its content. Which of the following commands will you use to accomplish the task?

A)       ps StatPro.txt
B)        ps >> StatPro.txt
C)       ps | more StatPro.txt
D)       ps > StatPro.txt

Answer: B
32.     When you remove a user account from your Linux system, the files and directories of this user may still remain on the system. Which of the following commands can you use to remove all items from your Linux system? Each correct answer represents a complete solution. Choose two.

A)       userdel -r
B)       userdel -f
C)       userdel -h
D)       userdel -c

Answer: A,B

33.     You work as the Network Administrator for Perfect solutions Inc. The company has a Linux-based Network. You are a root user on the Red Hat operating system. You want to grant ownership of  the file foofile to a user John. Which of the following commands should you use to accomplish this task?

A)       chown John foofile
B)       chmod John foofile
C)       chgrp foofile John
D)       chown foofile John

Answer: A

34.     Which of the following cp command parameters copies only when the source file is newer than the destination file or when the destination file is missing?

A)       -u
B)        -l
C)       -p
D)       -s

Answer: A

35.Which graphical mail client is the default tool for email and groupware in Red Hat Enterprise Linux?

A)       mutt
B)       Evolution
C)       Thunderbird
D)       pidgin

Answer: B

35.     Fill in the blank with the appropriate permission to complete the statement below.
The___________command is used to start xsession using the xinit utility.

A)       startx
B)        start
C)       statx
D)       stretx

Answer: A

36.     Which of the following network diagnostic tools is NOT used in the Linux operating system?

A)       host
B)        dig
C)       ipconfig
D)       ping

Answer: C

37.     Which shell script is the first startup script run when a login shell is started in Linux?

A)       ~/.bashrc
B)       /etc/profile.d
C)       /etc/profile
D)       /etc/bashrc

Answer: C

38.     Which of the following commands is used to set down the interface and flush all its addresses?
A)       ifup
B)        ifdown
C)       ifconfig
D)                        down      

Answer: B

39.     You work as the Network administrator for McNeil Inc. The company has a Linux-based network. You are working as a root user on the Linux operating system. You have created a PostScript file on your system. You want to convert this file to a PDF file. Which of the following commands should you use to accomplish the task?

A)       ps2pdf
B)       evince
C)       pdf2ps
D)       enscript

Answer: A

40.     You work as a Network Administrator for McNeil Inc. The company has a Linux-based network. You are a root user on the Red Hat operating system. You want to see all directories and files, including hidden files of your home directory in long listing format. Which of the following command-line utilities would you use to accomplish this task?

A)       ls -al /root
B)        ls
C)       ls -s /root
D)       ls -h /root

Answer: A

41.     You work as the Network Administrator for McNeil Inc. The company has a Linux-based network. You are working a root user on the Red Hat operating system. You want to search for files named  snow.html, Snow.html, SNOW.html in the current directory. Which of the following commands  should you use to accomplish the task?

A)    find -iname snow.html
B)     find -name snow.html
C)    find name snow.html
D)    find -i snow.html

Answer: A

42.     Which of the following commands is used to make traceroute wait 5 seconds for a response to a packet?

A)    traceroute -w
B)    traceroute -T
C)    traceroute -q
D)    traceroute -r

Answer: A

43.     Which of the following directories cannot be placed out of the root filesystem? Each correct answer represents a complete solution. Choose all that apply.

A)    /sbin
B)     /etc
C)    /lib
D)    /var

Answer: A,B,C

44.     You work as a network administrator for company Inc. The company has a Linux-based network. You want to create a file named foobar.zip and put it into a directory named filesdir. Which of the  following commands will you use to accomplish the task?

A)    unzip foobar.zip filesdir
B)     zip -r foobar.zip filesdir
C)    tar -tvf foobar.tar
D)    gunzip foobar.zip

Answer: B
45.     Fill in the blank with the appropriate command to complete the statement below. In order to run the  httpd process with the highest priority, you will issue the _______ command to change the priority level of the httpd process.

A)    nice
B)    nise
C)    neace
D)    nic

Answer: A

46.     Which of the following commands can be used to delete all jobs queued in a printer?
Each correct answer represents a complete solution. Choose all that apply.

A)    lprm -a all
B)    lprm -all
C)    lprm - *
D)    lprm -

Answer: A

47.     You work as a Network Administrator for Tech World Inc. The company has a Linux-based network. The permissions on a file named Report are shown below:
rwxr--r--  You want to add a sticky bit to the file. Which of the following commands will you use?

A)    chmod 2744 report
B)     chmod 4744 report
C)    chmod 7744 report
D)    chmod 1744 report

Answer: D

48.     What will be the output of the following command? echo $(date %M) > date.txt

A)    It will print a string "date %M".
B)     The current time (Month) will be written in the date.txt file.
C)    The current time (Minutes) will be written in the date.txt file.
D)    It will create a variable $(date %M).

Answer: C

49.     You are a newly appointed technician for company Inc. The company has Linux- based network. You have executed a command find /home - user joe -group joe on the terminal. What will this  command do?

A)    It will search for files owned by the user joe -group joe anywhere on the system.
B)    It will backup files owned by the user joe -group joe in /home/.
C)    It will display the content of a file that belongs to group joe.
D)    It will search for files owned by the user joe -group joe in /home/.

Answer: D

50.     You work as a Network Administrator for Tech Perfect Inc. The company has a Linux-based network.  There are six files in a directory on your laptop. You want to find out the file types of all the files at a time. Which of the following commands will you use?

A)    fsck
B)     file
C)    mount
D)    init

Answer: B

51.     Which of the following commands does not save changes before exiting from the VI editor?

A)    :q!
B)     :q
C)    zz
D)    :w

Answer: A

52.     Which of the following commands pipes stdout and stderr from cmd1 to cmd2?

A)    cmd2 | cmd1
B)    cmd2 2>&1 | cmd1
C)    cmd1 | cmd2
D)    cmd1 2>&1 | cmd2

Answer: D

53.     You work as the Network Administrator for McNeil Inc. The company has a Linux- based network. You are working as a root user on the Red Hat operating system. Joe is a user in your company. You want to remove Joe's tmp files that are 3 days older. Which of the following command  syntaxes should you use to accomplish the task?

A)    find /tmp -cmin +3 -user Joe -ok rm {} \;
B)     find /tmp -ctime +3 user Joe -ok rm {} \;
C)    find /tmp -ctime +3 -user Joe -ok rm {} \;
D)    find /tmp -cmin +3 user Joe -ok rm {} \;

Answer: C

54.     You work as a Network Administrator for McNeil Inc. The company has a Linux-based network. You are a root user on the Red Hat operating system. You want to know how many words are  present in the file named file1.txt. You type the following command on the terminal: wc file1.txt.  The command displays the following output:
40 245 1800 file1.txt How many words are present in the file file1.txt?

A)    40
B)    285
C)    245
D)    1800

Answer: C

55.     Which of the following is NOT true about the inode table in the Linux operating system?

A)    It contains the location information where data is stored in the hard disk.
B)     It contains information about what type of access permission of the file is available to whom.
C)    It contains the last access time, last modification time, however it does not store the last inode change time.
D)    It contains the file type of the specified file.

Answer: C

56.     You work as a Network Administrator for Perfect Solutions Inc. The company has a Linux-based network. Rick, a Sales Manager, wants to combine the contents of the Sale1.txt and Sale2.txt files to a new file named FinSale.txt. Which of the following commands will he use to accomplish the task?

A)    ls Sale1.txt Sale2.txt < FinSale.txt
B)    cat Sale1.txt Sale2.txt < FinSale.txt
C)    ls Sale1.txt Sale2.txt > FinSale.txt
D)    cat Sale1.txt Sale2.txt > FinSale.txt

Answer: D

57.     You work as a Network Administrator for company.com Inc. You have created a PostScript file by using a program. You want to convert it to a PDF file. Which of the following commands will you use to accomplish the task?

A)    ps2pdf
B)     enscript
C)    pdf2ps
D)    a2ps

Answer: A

58.     Fill in the blank with the command to complete the statement below. Do not enter the full path of the command. The ________ command is used to compare the contents of two files for  differences in the Red Hat operating system.

A)    diff
B)    differ
C)    deff
D)    daff

Answer: A

59.     John is a newly appointed Network technician at McNeil Inc. The company has a Linux-based Network. John is currently working on the /tmp directory. The /tmp directory has a file named file3.txt. John wants to copy this file in a subdirectory named backup of his home directory /home/John. Which of the following commands should John use to accomplish his task? Each correct answer represents a complete solution. Choose three.

A)    cp file3.txt /home/John/backup
B)    cp file3.txt /home/John/backup/
C)    cp file3.txt backup
D)    cp file3.txt ~/backup

Answer: A,B,D

60.     You work as a Network Administrator for Perfect Solutions Inc. The company has a Linux-based network. You want to modify a configuration file in a Linux server. Which of the following utilities will you use to accomplish the task?

A)    VI
B)     NMAP
C)    MS Word
D)    GZIP

Answer: A

61.     Which of the following is a utility that can function as an independent spell checker?

A)    spell
B)    nice
C)    aspell
D)    inspell

Answer: C

62.     You want to repeat the last command you entered in the bash shell. Which of the following commands will you use?

A)    history !#
B)     history !!
C)    history ##
D)    history !1

Answer: B

63.     Which of the following SHELL commands displays currently logged-in users and their tasks?

A)    w
B)    finger
C)    whoami
D)    who

Answer: A

64.     John works as a Network Administrator for Perfect Solutions Inc. The company has a Linux-based network. John is working as a root user on the Linux operating system. He wants to change the modified date and time of the file private.txt to 11 Nov 2009 02:59:58 am. Which of the following commands will John use to accomplish his task? Each correct answer represents a complete solution. Choose all that apply.

A)    touch -t 200911110259.58 private.txt
B)     rm private.txt #11 Nov 2009 02:59:58 am
C)    touch private.txt #11 Nov 2009 02:59:58 am
D)    touch -d "11 Nov 2009 02:59:58 am" private.txt

Answer: A,D

65.     Which of the following are the Graphical Mail clients in Red Hat Enterprise Linux?
Each correct answer represents a complete solution. Choose two.

A)    Pidgin
B)    Mozilla
C)    Evolution
D)    mutt

Answer: B,C

66.     You work as a Network Administrator for Net Perfect Inc. The company has a Linux-based  network.  By using the VI utility, you have created a document that has 100 lines. You want to replace all the occurrences of "net" with "Net" in the first 50 lines of the document. Which of the following commands will you use?

A)    :1,$ s/net/Net/g
B)     :1,100 s/net/Net/g
C)    :1,50 s/net/Net/g
D)    :s/net/Net/g

Answer: C

67.     Which of the following commands will you execute to fix other writable files in your home directory?

A)    find -perm -002 -exec chmod o-w {} \;
B)    find /home -type d -ls
C)    find ~ -perm -002 -exec chmod o-w {} \;
D)    find ~ -perm -002 -exec chmod -w {} \;

Answer: C

68.     John works as a Network Administrator for Perfect Solutions Inc. The company has a Debian Linuxbased network. He is working on the bash shell in which he creates a variable VAR1. After some calculations, he opens a new ksh shell. Now, he wants to set VAR1 as an environmental variable so that he can retrieve VAR1 into the ksh shell. Which of the following commands will John run to accomplish the task?

A)    touch VAR1
B)     env -u VAR1
C)    export VAR1
D)    echo $VAR1

Answer: C

69.     You run the wc -c file1.txt command. If this command displays any error message, you want to store the error message in the error.txt file. Which of the following commands will you use to accomplish the task?

A)    wc -c file1.txt >>error.txt
B)    wc -c file1.txt 1>error.txt
C)    wc -c file1.txt 2>error.txt
D)    wc -c file1.txt >error.txt

Answer: C

red hat linux questions and answers  red hat linux questions and answers Reviewed by Positive thinking on 8:09 AM Rating: 5

No comments

Recent