Sei sulla pagina 1di 4

HP Unix Test

1) The values for the login_name, login_directory, and login_shell variables are
configured in which file?
A. /etc/passwd
B. /etc/profile
C. /etc/default
D. $HOME/.profile
2) What are examples of SYS-V IPC services? Select THREE
A. signals
B. threads
C. semaphores
D. sense switches
E. shared memory
F. message queues

3) On which port does the telnet daemon listen for client requests?
A. 69
B. 23
C. 111
D. 115
4) Which run states are valid for a process under HP-UX? Select THREE.
A. waiting
B. zombie
C. pending
D. sleeping
E. signaling
F. ready to run
5) Write a command to kill the last background job?
6) Which command is used to delete all files in the current directory and all its subdirectories?
7) Is it possible to restrict incoming message? If yes How?If no Why?
8) Is it possible to count number char, line in a file; if so, How?

9) Which command is used to display all the files?


A.
B.
C.
D.
E.

ls
cat
ls -a
type
dir

10) Which command is used to modify the access time of a file?


A.
B.
C.
D.
E.

chmod
chown
touch
cd
grep

11) vim editor uses which hidden file for configuration settings
A.
B.
C.
D.
E.

.bashrc
.exrc
.etcrc
.vimrc
.usrc

12) How do we configure the vim editor to automatically add numbers to the file when it
opens?
A.
B.
C.
D.
E.

se nu
se bs
se history
se noai
se nonu

13) Which command is used to view the file without modifying it ?


A.
B.
C.
D.
E.

view
cat
more
head
tail

14) For some file the access permissions are modified to 764. Which of the following
interpretation are valid:
a. Every one can read, group can execute only and the owner can read and
write.
b. Every one can read and write, but owner alone can execute.
c. Every one can read, group including owner can write, owner alone can
execute
d.None of the above
15) Absolute path names begin by identifying path from the root.
a. True
b. False
16) How do you get all files with on the 3rd place an r, g or i?
ls ?3[rgi]*
ls **[rgi]?
ls [..i*]
ls ??[rgi]*
ls *[rgi]*

17) What command do you have to use to go to the parent directory?


cd ~
cd cd /up
cd ..

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


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

19) What is ps command for?


1. prints the status
2. prints the process status
3. prints the execution status
4. none
20) Which symbol will be used with grep command to match the pattern pat at the beginning of
a line?
A.
B.
C.
D.
E.

^pat
$pat
pat$
pat^
None of the above

21) Which command is used to copy all files having the string chap and any two characters
after that to the progs directory?
A.
B.
C.
D.
E.

cp chap?? progs
cp chap* progs
cp chap[12] /progs/*.*
cp chap?? /progs/*
None of the above

22) 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

23) Which command is used to extract specific columns from the file?
A.
B.
C.
D.
E.

cat
cut
grep
paste
None of the above

24 )Which command sends the word count of the file infile to the newfile.
A.
B.
C.
D.
E.

wc infile >newfile
wc <infile >newfile
wc infile - newfile
wc infile | newfile
None of the above

25)Where is the standard input,standard output and standard error go in the below statement?
$cat file1
Standard Input:
Standard Output:
Standard Error:

26) Where is the standard input,standard output and standard error go in the below statement?
$mail tim < letter

Standard Input:
Standard Output:
Standard Error:

27) How do you write a command for the below requirement:


Place the output of the command in fileb and associate any errors with the output in fileb

28) What is the output of the below command?Assume that you are in your Home Directory.
1)$echo "Home directory is $HOME"
2) $echo 'Home Directory is $HOME'
3) $echo "Home Directory is `HOME`"
4) echo * $HOME
29)What would be the value of x at the end of the following steps?
$ ( ... login shell ... )
$ ksh
$ x=50
$ export x
$ <ctrl -d>
( what is the value of x set to now?)

30)Indicate what the below command does?


$ ls -l /home | egrep 'txt$ | team01$' | sort -r +7 | tail +4 | head -5

Potrebbero piacerti anche