Example HP-UX Test
Here is an example HP-UX test. Some of the questions are similar to Linux but others are very different(check question 77 about rsh). I hope you find it useful.
1. How do you set up a symbolic link between two files? A. In -s link-file original-file B. In original-file link-file C. In original-file link-file -s -> D. In -s original-file link-file 2. .What would be returned by the command "echo $(date)" ? -> A. the current date and time would be shown B. $(date) C. the word "date" D. an error 3. Under the Korn and Posix shells, how do you pull back your previous commands? -> A. Escape k B. Escape p C. Escape h D. Escape Escape 4. Which command is used to pull out all lines of a file which contain a specified pattern ? A. pr B. tr C. wc -> D. grep 5. The units used for defining increase in size of a logical volume with the lvextend -L command, and a journal file system with the fsadm -b are respectively -> A. MB and file system blocks B. KB and KB C. MB and MB D. Extents and KB 6. You want to create a new 200MB logical volume from the volume group vg00, using the default physical extent size. Instead of taking the default logical volume name, you want to name your logical volume "newlv". What command would you use? A. lvcreate -l 200 -n newlv /dev/vg00 B. lvcreate -L 200 /dev/vg00/newlv C. lvcreate -l 200 -n /dev/vg00/newlv -> D. lvcreate -L 200 -n newlv /dev/vg00 7. What command would you use to check the physical extent size that will be used when you create logical volumes from the volume group "vgmyvol"? -> A. vgdisplay /dev/vgmyvol B. pvdisplay /dev/vgmyvol C. lvdisplay /dev/vgmyvol D. vgshow /dev/vgmyvol 8. If ioscan displays no device files for a claimed hardware path, which command can be used to recreate them? A. lssf B. reboot -> C. insf -e D. /sbin/ioinitrc 9. Identify the guidelines for configuring file system swap. (Select two) -> A. use fast disks B. use slow disks C.use busy filesystems D.use / as filesystem swap first -> E.choose infrequently used filesystems 10. You execute the "id" command that shows you the current UID and GID. What file does this information come from? A. /etc/group B. /etc/id -> C. /etc/passwd D. /etc/profile 11. How would you get a list of the absolute path names of all files in your home directory, which end in ".c". The list is to be held in a file called outfile. -> A. find $HOME -name "*.c" > outfile B. find . -name *.c > outfile C. find $HOME -name "*.c" 2> outfile D. find $home -name *.c > outfile 12. The following output is from the "ll" command: drwx------ 2 you other 96 Mar 2 19:51 data From this information "data" is a: A. deleted file waiting for trash collection. B. file, currently in use by two users. -> C. private directory. D. public directory. 13. If you wanted to append the contents of file f1 to the end of file f2 how would you do it using input/output redirection ? -> A. cat f1 >> f2 B. cat f1 > f2 C. cat f1 cat f2 D. cat f1 f2>f2 14. How do you see the contents of a variable? A. echo variable -> B. echo $variable C. Is $variable D. set $variable 15. At HP-UX 11, the name of the file used to hold the kernel is A. /hp-ux -> B. /stand/vmunix C. /stand/system D. /stand/build/vmunix 16. What is the difference between hot pluggable and hot swappable hardware ? A. Hot pluggable hardware applies to disk drives and hot swappable hardware applies to servers. B. The terms, hot pluggable hardware and hot swappable hardware, mean the same thing. -> C. Hot pluggable hardware requires system administrator intervention and hot swappable hardware does not. D. Hot swappable hardware requires configuration and hot pluggable hardware does not require system administrator intervention. 17. Which file contains a history of unsuccessful logins? A. /etc/wtmp B. /var/adm/utmps C. /var/adm/btmps D. /var/syslog/failed_logins 18. What is the purpose of the extendfs command? A. increases the size of active swap B. increases the size of a logical volume -> C. extends a file system within a logical volume D. shares a logical volume with another system 19. What describes the difference between character and block I/O? A. Character I/O is for small data transfers only and block I/O is for large data transferredonly. B. Character I/O is used to send data to disk and block I/O is not. -> C. Character I/O does not go through the buffer cache and block I/O goes. D. Block I/O does not go through the buffer cache and character I/O goes. 20. The HP-UX SMH is started using which URL? A. http://hostname B. http://hostname:80 -> C. http://hostname:2301 D.http://hostname/hpsmh 21. What is the major number for LVM DSFs using disk layout 1? A. 32 -> B. 64 C. 128 D. 256 22. If vg05 has two logical volumes created using the default naming convention, overall, how many DSFs should you find in /dev/vg05? A. 2 B. 4 -> C. 5 D. 6 23. What is the minor number for /dev/vg17/lvol5 using disk layout 1? A. 0x170005 B. 0x110101 C. 0x1A0017 -> D. 0x110005 24. What is the minor number for /dev/vg15/group using disk layout 2? A. 0x000015 B. 0x0F0101 -> C. 0x00F000 D. 0x150000 25. What command would you use to create LVM header structures on disk1? -> A. pvcreate -f /dev/rdisk/disk1 B. pvcreate -f /dev/disk/disk1 C. pvcreate -f /dev/dsk/disk1 D. vgcreate vg05 /dev/disk/disk1 26. What command would you use to add volume group vg05 to LVM’s /etc/lvmtab* configuration files and assign disk1 to that volume group? A. vgcreate –V 2.0 vg05 /dev/rdisk/disk1 B. vgcreate /dev/vg05/group /dev/disk/disk1 C. vgcreate /dev/dsk/disk1 vg05 -> D. vgcreate vg05 /dev/disk/disk1 27. What command would you use to create a superblock, inode table and other metadata structures on lvol1 in volume group vg01? A. fsck /dev/vg01/lvol1 -> B. newfs /dev/vg01/rlvol1 C. newfs –m /dev/vg01/rlvol1 D. pvcreate vg01 /dev/vg01/lvol1 28. What is the legacy DSF name for the disk class device provided ioscan has the following output? # ioscan –kf Class I H/W Path Description ===================================================== ext_bus 5 1/0/2/1/0.6.1.0.0 FCP Array Interface disk 3 1/0/2/1/0.6.1.0.0.0.1 HP HSV101 -> A. /dev/dsk/c05t0d1 B. /dev/disk/c03t0d0 C. /dev/rdisk/c05t0d1 D. /dev/dsk/c03t0d1 29. What is the persistent DSF name for the disk class device provided ioscan has the following output? # ioscan –kfNn Class I H/WPath Driver S/W State H/WType Description ================================================================= disk 10 64000/0xfa00/0x4 esdisk CLAIMED DEVICE HP HSV101 A. /dev/dsk/esdisk B. /dev/disk/esdisk -> C. /dev/rdisk/disk10 D. /dev/dsk/disk10 30. Assuming a volume group uses the default extent size, how many physical extents would you expect to find on a 400 MB physical volume? -> A. 100 B. 200 C. 300 D. 400 31. Which command is not a filter? A.grep B.more -> C.ls D.cut 32. Why do you see an 'x' for the users in the second field of the /etc/passwd file? Unix:x:501:100::/home/Unix:/usr/bin/ksh user1:x:502:100::/home/user1:/usr/bin/ksh A. password is expired B. blank password is used C. user is currently deactivated -> D. shadow password is enabled 33. You login HP-UX on a character terminal. After you type your user name , you find that the last character you typed is incorrect. How can you delete the incorrect character? A.use "Backspace" key. -> B.use "Shift"+"3" key. C.use "Shift"+"2" key. D.use left arrow key,then use "Delete" key . 34. Which is the best way to edit "/etc/passwd" file? A. vi -safe /etc/passwd B. vi /etc/passwd C. cp /etc/passwd /tmp/passwd then vi /etc/passwd -> D. vipw 35. Which command can remove the abnormal directory "-xyz" ? A. rmdir -d "./-xyz" B. rmdir -r "./-xyz" C. rm -a "./-xyz" -> D. rm -r "./-xyz" 36. On a system with a standard HP-UX installation if the user is greeted with the '>' prompt they need to: A. immediately log-off. B. reboot the system. -> C. complete their current command line. D. reset their password. 37. A file may have more than one name. This is accomplished using which of the following commands? A. dup -> B. ln C. alias D. fork 38. How would you move a file called datafile from your current directory to the /var directory ? -> A. mv datafile /var B. mv /var datafile C. mv datafile -d/var D. mv datafile ../var 39. For each device file in the "/dev" subdirectory, the "major number" identifies the: A. priority order for accessing the device. -> B. device driver that should be used when the device is accessed. C. class of device, for example, "disk device", "tape device","tty device", etc. D. device file to be used for communication. 40. The steps needed to set up an active journal file system, which is mounted at boot time, are A. create a new logical volume, use the newfs command with the -F jfs option, mount the file system using the -F jfs option -> B. create a new logical volume, use the newfs command with the -F vxfs option, mount the file system using the -F vxfs option, add an entry into /etc/fstab C. create a new logical volume, use the fsadm command with the -F vxfs option, mount the file system using the -F vxfs option, add an entry into /etc/vfstab D. create a new logical volume with the -F vxfs option, mount the file system using the -F xfs, option, add an entry into /etc/checklist 41. Hard links are A. a safe way to link files across file system boundaries B. should not be used unless absolutely necessary C. a safe way to link files and directories within a file system -> D. a safe way to link files within a file system 42. Which HW components are always found in an HP Integrity processor-based system? (Select three.) -> A. core I/O B. cell boards -> C. Itanium CPU -> D. PCI I/O cards E. PA 8900 CPU F. HP-PB I/O cards 43. The major steps required to set up a new user are A. an entry in /etc/password, an entry in /etc/group, a home directory B. an entry in /etc/passwd, an entry in /etc/hosts, a home directory with login scripts C. an entry in /etc/password, an entry in /etc/hosts, a home directory with login scripts -> D. an entry in /etc/passwd, an entry in /etc/group, a home directory with login scripts 44. What are features of Secure Shell? (Select three) -> A. integrity of communication B. prevents denial of service attacks -> C. secure remote command execution D. authentication through hidden identity -> E. privacy of data through strong encription 45. The /etc directory is used A. for operating system configuration data B. for application configuration data C. for operating system and application configuration data and executables -> D. for operating system and application configuration data 46. Which are structures inside JFS? (Select two) A. mcells -> B. intent log C. fragment -> D. inode table E. cylinder group 47. Which are features of the Online JFS file system? (Select two.) A. supports larger disk drives B. allows more files per file system -> C. supports online defragmentation D. supports 1024 bit encryption of system files -> E. supports dynamic online resizing of the file system 48. An LVM physical volume is A. a disk section with the LVM structures installed B. a RAID device C. a raw device -> D. an entire disk with the LVM structures installed 49. The last entry in the /etc/passwd line for a user defines A. a shell B. the home directory C. the password ageing -> D. an executable application program or shell 50. Which commands can not be used to send a software termination signal to the sh process with an id of 15 and job number 15? (Select two.) A. kill -15 %15 B. kill -s SIGTERM 15 C. kill -15 15 -> D. kill SIGTERM 15 E. kill 15 -> F. kill -s sh 15 51. The ____________ command will show currently mounted file systems, the total size of each file system, the amount of space used from each file system, and the amount of space available in each file system. A. mount -> B. bdf C. du D. ll 52. The file that contains the default file system type for file system creation is: A. /etc/fstab B. /etc/filesystem -> C. /etc/default/fs D. /var/adm/sbtab 53. Which commands can be used to show device file details? (Select two) A. lsdev B. ll -d C. ioscan -fn D. lssf E. lsf -a 54. The command to set up a logical volume called lvswap in the volume group /dev/vg01 with a size of 20 MB is A. lvcreate -n lvswap -l 20 /dev/vg01 B. lvcreate -name lvswap -L 20 /dev/vg01 -> C. lvcreate -n lvswap -L 20 /dev/vg01 D. lvcreate -l 20 /dev/vg01 -n lvswap 55. Pipes allow: A. data to be transferred from one system to another. B. file contents to be combined into a single stream. C. the output of one command to be used as input for another command. D. the same data to be sent to multiple commands at the same time. 56. What does the command tr -s " " do ? -> A. squeeze out multiple spaces from stdin B. replace all s with " " C. change single spaces into double spaces from stdin D. translate spaces into s 57. Which script will be excuted after a user has input correct user name and password? A. /.profile B. /etc/.profile C. $HOME/.profile -> D. /etc/profile 58. If you wish a command to run in background how do you set it off ? A. bg command B. nohup command C. command bg -> D. command & 59. What will happen when the second field has '*' in the file /etc/passwd? A. User can login without any password B. User can login with password '*' -> C. The user is disabled D. The user must change his password when he first login 60. What is the purpose of a "continue" command ? A. to proceed with a shell script after a pause command B. to continue processing an infinite loop from the current point -> C. to go back to the start of a loop structure D. to proceed wi th a shell script after a sleep command 61. Which file on HP-UX contains a list of standard port numbers for different applications? A. /etc/hosts B. /etc/ports C. /etc/protocols -> D. /etc/services 62. Which statement is true? A. HFS keeps a record of all transactions in the intent log. -> B. JFS keeps a record of all transactions in the intent log. C. Both JFS and HFS keep a record of all transactions in the intent log. D. The JFS filesystem size cannot be modified. 63. A filesystem metadata area contains: A. superblock B. inodes C. directory area -> D. all of the above 64. What is the default number of the logical volumes in a volume group? A. 15 B. 16 -> C. 255 D. 1024 65. Which information is not displayed when the pvdisplay command is used without any command-line options? -> A. name of the filesystem created on the disk B. total number of physical extents C. name of the volume group to which the physical volume is related D. allocated physical extents 66. What is the name for the default root volume group name? A. default -> B. vg00 C. vgdefault D. There is no particular name for the default group. Any group can be configured as the default volume group. 67. Which step is required before adding a new disk to a volume group? -> A. create a physical volume B. extend the logical volume C. create a filesystem D. extend the filesystem. 68. What is the major device number for LVM device files? -> A. 64 B. 32 C. 128 D. 1 69. What is the default physical extent size used in LVM? -> A. 4 Mbytes B. 4 Kbytes C. 16 Mbytes D. 16 Kbytes 70. Three disks are attached to an SCSI adapter with device numbers 6, 1, and 15. Which of these has the highest priority? -> A. 6 B. 1 C. 15 D. All disks have the same priority. 71. Which variable in a shell program is used to determine the total number of command line arguments? A. $? -> B. $# C. $* D. $@ 72. You want to search all lines in a file myfile that starts with the word "boota". Which of the following commands will you use? A. grep $boota myfile -> B. grep ^boota myfile C. grep boota^ myfile D. grep boota$ myfile 73. Pipes are used to: A. redirect standard input B. redirect standard output C. redirect either standard input or standard output but not both simultaneously -> D. send output of one command to the input of another command. 74. Which command will you use to count the number of lines in a text file? -> A. wc B. ls C. lines D. cat 75. You are in the /var/tmp directory and want to copy file myfile from the /tmp directory to the current directory. Which command cannot be used for this purpose? A. cp /tmp/myfile . B. cp /tmp/myfile /var/tmp C. cp ../../tmp/myfile /var/tmp -> D. cp /tmp/myfile .. 76. Which shell does not have history feature? -> A. Bourne shell B. Korn Shell C. C Shell D. POSIX shell 77. The rsh command on HP-UX can be used to: A. execute a remote command B. log in and initiate a shell on a remote system -> C. This is a restricted shell on HP-UX. D. grant read-only access to a system 78. Which one of the following commands is used to determine the user’s UID and primary group membership? A. group B. groups -> C. id D. grpck 79. Which one of the following folders stores raw disk persistent DSFs? A. /dev/disk B. /dev/dsk -> C. /dev/rdisk D. /dev/rdsk 80. Consider the following legacy DSF name /dev/dsk/c9t0d1. When you run the ioscan –kf command, then the instance number of the device with that name is: A. 9 B. 0 C. 1 -> D. None of the above
blog comments powered by Disqus