Thursday, November 5, 2009

For those that still want to know "Final AIX test Answers"

1 What is the correct command to save the output of the command in one file and the error messages in another?

A command 1>file1 2>&1
B command 1>file1 2>file2
C command 1>file1 2>file1
D command 2>file2 1>&2

2 A directory with files can be deleted with which of the following commands?

A rm -r
B mvdir
C touch
D rmdir

3 Where will the final output be placed after this sequence of piped commands? ls -l | pg

A list
B terminal screen
C root directory
D default system printer

4 Which command will invoke the man pages for the pwd command?

A catman -w pwd
B man pwd
C man -k pwd
D man -f pwd

5 Which command will measure the network response time of a remote machine?

A ftp
B ping
C trace
D netstat

6 Which dd command is using a relative path name as the source argument and an absolute path name as its target argument?

A dd if/home/blue of=/
B dd if=blue of=/dev/rmt0
C dd if=blue of=./dev/fd0
D dd if=/home/green of=/u/blue/green

7 Which of the following commands will save the file the user is editing and not exit vi?

A :wq
B :w
C :x
D ZZ

8 What file can be used to alter a user's login environment in the Korn Shell?

A /ENV
B .kshrc
C /etc/.profile
D /home/profile

9 Which method would be used to cancel the print job number 321 that was submitted to the color print queue using system V printer subsystem commands?

A cancel color
B cancel -u 321
C cancel 321
D cancel -u color

10 What is necessary to use the contents of a file as input for an AIX command?

A redirect standard input
B append standard input
C redirect standard output, then standard input
D type the contents of the file onto the command line

11 Which command can be used to enter vi editor and create the file "myfile" without generating any errors?

A vi myfile
B vi -c myfile
C vi -y myfile
D vi -t myfile

12 When ftping what is the command to send a file to a remote machine?

A put
B open
C ntrans
D stream

13 Which keystroke sequence can be used to suspend a process in the Korn Shell so it may be restarted at a later time?

A Ctrl-c
B Ctrl-q
C Ctrl-x
D Ctrl-z

14 What is the correct flag to telnet to a remote machine as a specific user?

A tn -f
B tn -d
C tn -p hostname
D tn -l user hostname

15 How can permissions for the chmod command be written?

A As a hex number
B In either octal or symbolic notation
C As string of "rwx" to picture the layout of the permissions
D In the first line of a file when it is created, and then interpreted by the shell

16 Which command will display all lines in file1 that contain the string abc but NOT the string xyz?

A grep -E "abc&!xyz] file1
B grep abc file1 | grep -v xyz file1
C grep [abc][^xyz] file1
D grep -v xyz "abc" file1

17 Which key should be pressed in the vi editor to enter text-input mode and begin inserting text BEFORE the cursor position

A a
B i
C $
D o

18 If the current directory is /tmp which command will display the available file system space in the user's current directory?

A df .
B du $tmp
C du .
df $tmp

19 Which command should be used to permit ONLY the owner to use the script file named savemachine as an executable script?

A chmod 777 savemachine
B chmod -x ./savemachine
C chmod u=rwx,go= savemachine
D chmod go-w+x savemachine

20 Which of the following commands will cause a syntax error?

A cd; ./.profile
B ps -ef | grep init
C TERM=ibm3151 / export TERM
D find / etc -print | grep motd

21 what is the correct user command to remove the link foo?

A ln -s foo /dev/null
B ln foo garbage
C unlink foo
D rm foo

22 Which of the following commands should be used to list all files in the root filesystem that are named .profile?

A find . -name .profile
B find / -name .profile -print
C find * -name "*profile" -ls
D find ../. .profile -exec ls -l

23 What is the Korn Shell variable PS1 used for?

A To specify the first process running
B To specify the shell's parent process
C To specify the priority setting of a Korn Shell
D To specify the string to be used as the primary system prompt

24 A user is trying to read a logfile that gets updated every minute. What is the correct command to view the new incoming messages in real time?

A more logfile
B cat -v logfile
C pg logfile
D tail -f logfile

25 Which vi command is used to reverse the last action taken

A r
B c
C u
D x

26 Which command is used to exit the vi editor without saving the data?

A :q!
B :e!
C :wq!
D ZZ

27 Which of the following describes the function of the -p flag of the mkdir command?

A It preserves the permissions of the parent directory for subordinate directories and files
B It creates missing intermediate path name directories
C It causes the mkdir command to execute as a background process
D It preserves the date and timestamp information of the parent directory and applies it to the subordinate directories and files

28 Which of the following will cancel all print jobs on the print queue named ascii for the user guest_user?

A lprm ascii guest_user
B lprm guest
C lprm -P guest_user
D lprm -P ascii guest_user

29 What is displayer by the command     grep -v "^#"

A All lines that begin with a ^
B All lines that begin with a ^ or #
C All lines that do not begin with a #
D Lines that do not begin with a # or ^

30 Write the corresponding number of the command in the correct description

1 ls                  _5_ Updates the access and modification times of a file
2 pwd              _6_ Determines the file type
3 cd                 _8_ Changes file system object's base file mode bits
4 mkdir           _3_ Changes the current directory
5 touch           _4_ Creates one or more new directories
6 file                _10_ Links files
7 istat              _1_ Displays the contents of a directory
8 chmod            _9_ Changes the owner or group associated with a file
9 chown            _7_ Examines i-nodes
10 ln                  _2_ Displays the path name of the working directory

Bonus Question (5 Points)

What does AIX stands for? 

 Advanced Interactive eXecutive

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.