Showing posts with label Upwork > Operating Systems. Show all posts
Showing posts with label Upwork > Operating Systems. Show all posts

Tuesday, 22 September 2015

Unix Test

Unix Test

:: Home > Upwork > Operating Systems > Unix Test

Which type of users can be associated with each file in UNIX?

a. The file owner
b. The group owner of the file
c. Other users who are not part of the group
d. a and b
e. a, b and c

Which of the following commands can be used to add the read and write permissions to the user and group classes of a file named abc?

a. chmod ugo+rw abc
b. chomd abc ug -rw
c. chmod ug-rw abc
d. chmod ug+rw abc

Which file contains the commands that the system executes when a user logs in?

a. $HOME/startup
b. user/init
c. $H0ME/.profile
d. etc/startup

With regard to UNIX, a process is:

a. the name of a command
b. the name of the administrator
c. the name of the UNIX server
d. a program in a state of execution
e. another name for a file

The command

Is | more

displays a list of

a. all the files in the current directory
b. all the files in the current directory one line at a time
c. all the files in the current directory one screen at a time
d. all the files in the current directory and then waits for the next command
e. all the files in all the directories

Which option of the sort filter folds lower case characters to upper case?

a. -r
b. -f
c. -n
d. -t
e. –o

What is the exit code of a successful command?

a. 0
b. 1
C. -1
d. 100
e. 10

What is the file descriptor for the standard error file?

a. 0
b. 1
c. 2
d. 3
e. 4

Mounting a file system means:

a. Preparing it for backup
b. Copying all the files from one file system to another
c. Moving all the files from one file system to another
d. Loading a file system from backup medium like tape
e. Providing a Iink to the file system to be mounted so that it appears as a local subdirectory

Which option of the grep filter prints out all those lines that do not match the pattern specified by the regular expression ?

a. -n
b. -c
c. -d
d. -I
e. –v

Which command compresses a file?

a. compress
b. zip
c. pack
d. comp
e. size

Which command would make the scope of a shell variable global to the subshells?

a. global
b. export
c. scope
d. grant
e. extend

Which command will you use to count the number of words in a file?

a. count
b. grep
c. wc
d. word count

Which of the following statements is incorrect?

a. UNIX operating system is available on machines with a wide range of computing power, from microcomputers to mainframes
b. UNIX is a multi-user system designed to support a group of users simultaneously
c. UNIX uses a hierarchical file structure to store information
d. At the core of UNIX is the shell, a program controlling the computer's resources
e. UNIX has facilities called pipes and filters which permit the user to create complex programs from simpler programs

Who can change the password of a user account?

a. Administrator
b. The root user
c. All the members of the Administrator group
d. Account owner

Which of the following statements is incorrect regarding processes?

a. More than one process can be active even if there is only one processor
b. A background process runs as a child process of the shell
c. If the parent process is killed, then always, the child process is also terminated
d. A process can be killed by pressing the ctrl+c keys
e. A process can be killed by the kill command

Which option of the sort filter changes the output to reverse order?

a. -r
b. -f
c. -n
d. -t
e. –o

Which of the following is not a valid file command?

a. Is
b. cat
c. mv
d. cp
e. break

Which command is used by a user to define a printer for their session?

a. Using Ipdest environmental variable
b. Using spooler command
c. Using Ipadmin command
d. Using printf command

Which character would be used in the grep filter to specify a pattern which consists of any one of a set of characters?

a. []
b. A
c. $
d. .
e. \

Which variable contains the system prompt?

a. PS1
b. PATH
c. PROMPT
d. HOME
e. LOGNAME

By which command a user can add a password for his login name?

a. passwd
b. pass
c. chpass
d. password
e. setpass

Which command is used for changing the ownership of a file or directory?

a. chmod
b. chown
c. owner
d. All of the above

Which of the following statements is incorrect regarding positional parameters?

a. They are used to create generalised scripts
b. There can be a maximum number of 9 variables
c. The shift command is used when the number of parameters exceeds 9 to shift the values of variables
d. Depending upon the number of arguments specified in the command line, the shell will assign values to some or all of the positional parameters
e. The command name is put into the variable $1

Which command is used to run a command at a specified time?

a. timer
b. at
c. time
d. atq
e. dd

Point out the incorrect statement regarding standard input, output and error:

a. The terminal is the standard source for input and the standard output and standard error destination for most UNIX commands
b. All data sources and destinations are treated as files in UNIX
c. The three standard files have a file descriptor
    0- standard output file
    1 - standard input file
    2- standard error file
d. The input, output and error output can be redirected to a file other than the standard file using file descriptors and the > or < symbol
e. The output and error can be redirected in the append mode to add the redirected output or error to an existing file using the » symbol

Consider the following file listing of file abc 1 for a user abc

_rw_------       1       abc       student                1Q      jan       10 39       abd

What inference would you make regarding the file access permissions ?

a. The group have full permissions
b. Only the owner has full permissions
c. Only the owner has read and write but no execute permissions
d. The group has read and write permissions
e. Others have read and write permissions

Which of the following commands can be used to see the detailed information on how to use a particular command?

a. $ man
b. $ show
c. $ details
d. $ help

Which special variable will display the exit status of the last executed command in Bourne or Korn shell?

a. $#
b. $-
c. $?
d. $$
e. $i

You want to search for the pattern "Newa" or "Newb" or "Newc". Which regular expression will you use with the grep command?

a. "New[abc]”
b. "New[a-c]”
c. "New[Aabc]”
d. a or b
e. b or c

Pipes is/are:

a. special programs that prevent the system from crashing
b. disk management utilities
c. memory management utilities
d. a special feature by which the standard output of a command or user program can be sent as the standard input to another command or user program
e. special channels for high speed data transfer

You are writing a shell script.For a given condition, you want to terminate a loop. Which command will you use?

a. terminate
b. end
c. break
d. stop
e. exit

The executable file name for the Bourne shell is:

a. bsh
b. sh
c. csh
d. ksh
e. Ish

The shell variable that defines internal field separator is.

a. PS1
b. PATH
c. HOME
d. L0GNAME
e. IFS

Which of the following commands can be used to view the calendar of April 2007?

a. $ cal april 2007
b. $ cal april 07
c. $ calendar 4 07
d. $ cal 4 2007

Which filter will you use to translate a set of charaters to another?

a. grep
b. cut
c. tr
d. we
e. tee

The number of arguments can be known by which variable?

a. $-
b. $?
c. $l
d. $#
e. $$

The command to take a backup of files and directories on magnetic tape is:

a. tar-xv
b. tar-tv
c. tar-cv
d. tar-td
e. tar-uv

What will be the result of command " rm-r directory/*”?

a. It will remove the directory and all the files present in that directory
b. It will remove all the files but not the directory
c. It will show an error message
d. None of the above

Which command is used for splitting a file horizontally?

a. cut
b. head
c. tail
d. b and c
e. a, b and c

Saturday, 19 September 2015

Redhat Linux 9.0 Admin Test

Redhat Linux 9.0 Admin Test

:: Home > Upwork > Operating Systems > Redhat Linux 9.0 Admin Test

Sticky bit and suid are to be set on /home/test. Which command should be used to give rwx permissions to each user, group and others?

a. chmod 1777/home/test
b. chmod 3777 /etc/test
c. chmod 3777 /home/test
d. chmod 3777 /homes/test

Which is the correct command to start the daemon of the printserver?

a. service printer start
b. service cupsd start
c. service cupd start
d. service cups start

The command which configures devices is:

a. kudzu
b. netconfig
c. kudu
d. netstat

What should be done to extend a 200MB LVM named lv0 by 50MB. A volume group named vg0 of 100MB is available free, lv0 is mounted on /test?

a. Ivextend -L 50MB IvO vgO
b. Ivextend -I 50MB IvO
c. Ivextend -I 50MB ivO vgO
d. Ivextend -L 50MB IvO

If /root partition is installed on /dev/hda2, what defines hda2?

a. 1st hard disk 1st partition
b. 2nd hard disk 2nd partition
c. 2nd hard disk 1st partition
d. 1st hard disk 2nd partition

What is the path of rc.sysinit?

a. /etc/rc.d/rc.sysinit
b. /etc/rc/rc.sysinit
c. /etc/init.d/rc.sysinit

What is the full form of MBR?

a. Memory buffer record
b. Memory boot register
c. Memory buffer register
d. Master boot record

How should a cron job that prints "hello" every morning at 4:02am, be set up?

a. # crontab -e and insert into 02 04 * * * print "hello"
b. # crontab -e and insert 02 04 * * * echo "hello"
c. # crontab -e and insert into 02 04 * * * echo "hello"
d. # crontab -e and insert into 02 4 * * * print "hello"

What types of files does /proc filesystem consist of?

a. Pseudo Files
b. System Binaries
c. Temporary Files
d. User Home Directories

What does the entry id:3:initdefault: define in the /etc/inittab file?

a. The system will boot by default in 3rd run level
b. The system will boot by default in graphical mode
c. The system will boot by default in single user run level
d. The system will boot but not in 3rd run level

In which of the following locations are boot messages stored?

a. /var/log/dmessg
b. /var/lag/dmesg
c. /var/log/dmesg
d. /var/log/messages

How can kernel-2.6.9-5 rpm be installed?

a. # rpm -U kernel-2.6.9-5. rpm
b. # rpm -ivh kernel-2.6.9-5.rpm
c. # rpm -IVH kernel-2.6.9-5.rpm
d. # rpm -install kernel-2.6.9-5.rpm

Which entry is specified in /etc/resolv.conf?

a. IP address of own machine
b. Nameserver IP address
c. Router machine IP
d. NIS domain IP

Which statement correctly creates a Volume Group, named vg0, when there are two partitions /dev/hda6 and /dev/hda7 of 150 MB each, totalling 300MB?

a. vgcreate -n vgO /dev/hda6 /dev/hda?
b. vgcreate -I vgO /dev/hda6 /dev/hda7
c. vgcreate vg1 /dev/hda6/dev/hda7
d. vgcreate vgO /dev/hdaS /dev/hda7

What problems will be faced during reboot, when the permissions of /tmp are 655, and the default permissions are 1777?

a. Xserver will not start
b. System will not boot properly
c. Device driver will not work
d. man pages will not work

During Linux installation, in which mode can RAID be created?

a. Only in graphical mode
b. Only in CUl mode
c. Both graphical and CUl mode
d. None of the above

A new swap partition is created and entered correctly in /etc/fstab. How will it be mounted?

a. # swapon -s
b. # swapon -a
c. # swapon -m
d. # swapon -A

How can ext2 filesystem be converted to ext3 filesystem if the partition is /dev/hda7 ?

a. tune2fs -j /dev/hda7
b. dump2fs -j /dev/hda7
c. tune2fs-f/dev/hda7
d. mke2fs -j /dev/hda7

A new partition /dev/hda6 has been created. How will it be formatted with ext3 file system (one block=1024 bytes, inode size=one inode every 2 blocks)?

a. mke2fs -b 2048 -i 2048 -j /dev/hda6
b. mke2fs -b 1024 -i 1024 -j /dev/hda6
c. mke2fs -b 1024 -i 2048 -j /dev/hda6
d. mke2fs -b 2048 -i 4096 -j /dev/hda6

Which of the following commands enables ip forwarding permanently?

a. Echo "1" > /proc/sys/net/ipv4/ip_forward
b. Open the file /etc/sysctl.conf and insert net.ipv4.ip_forward=1 in the file
c. Open the file /etc/sysctl.conf and insert net.ipv4_forward=0 in the file
d. Open the file /etc/sysctl.conf and insert net.ipv4.icmp_echo_ignore_all-1 in the file

Which command is used to set a quota for user Debbie. The path is /test, the size of quota is 5MB and soft limit is 4MB. The user is not allowed to use more than 5MB.

a. setquota Debbie 4MB 5MB 0 0 /test
b. setquota Debbie 4096 5120 0 0 /test
c. setquota Debbie 0 0 4096 5120 /test
d. setquota -s Debbie 4096 5120 0 0 /test

How much space does the IPL (Initial Program Loader) take on the disk?

a. 511 MB
b. 512 Bytes
c. 512 MB
d. 446 Bytes

How is an LVM of 200MB named lv0 created within the volume group vg0?

a. lvcreate –L 200MB lv0 vg0
b. lvcreate –L 200MB lv0 vg1
c. lvcreate –L 200MB lv0 vg0
d. lvcreate –L 200MB vg0 lv0

Can the size of LVM be decreased?

a. Yes
b. No

Which of the following denotes Raid level 0?

a. Striping with parity
b. Striping with mirroring
c. Striping
d. None of these

Which file contains the configuration of the network card?

a. /etc/sysc onfig/network-scripts/ifcfg-eth
b. /etc/sysconfig/hwdata
c. /etc/sysconfig/ntwork-scfipls/hwdata
d. /proc/sys/net/hwdata

/dev/hda6 and /dev/hda7 are two partitions of 150MB each. What is the correct statement to create physical volumes?

a. pvcreate pv0 /dev/hda6 /dev/hda7
b. pvcreate /dev/hda6 /dev/hda7
c. pvcreate -c pv0 /dev/hda6 /dev/hda7
d. pvcreate pv /dev/hda6 /dev/hda7

What is proc file system?

a. Physical partition created during installation
b. Virtual file system
c. It is the swap partition
d. None of these

Which of the following commands will format the /test partition?

a. ext2oniine -j /test
b. mke2fs   /test
c. mke2fs -j /test
d. ext2online   /test

Can / partition on lvm device be installed during installation?

a. Yes, it can be installed
b. This facility is only available in rhel3.0
c. Can install only one physical partition
d. None of these

In which mode can LVM be created during installation?

a. CUI only
b. GUI only
c. Both CUI and GUI
d. None of the above

How can you tell which RPM the /etc/inittab file belongs to?

a. rpm –ql /etc/initab
b. rpm –qf /etc/initab
c. rpm –i /etc/initab
d. rpm –e /etc/initab

When VGs (Volume Groups) are created, where are the VG information files stored?

a. /etc/lvm/
b. /etc/lvm/backup/
c. /tmp/lvm/backup
d. /etc/

How many disks are required in Raid level 5?

a. At least 2
b. At least 3
c. At least 1
d. At least 4

When the system is started, it shows Redhat Enterprise Linux. When the enter key is pressed, it shows the grub prompt. The present working directory is either / or /boot. How can you find the /boot partition at the grub prompt?

a. GRUB> find / boot/grub.conf
b. GRUB> find / grub/grub.conf
c. GRUB> find / grub/stage1
d. GRUB> find / grub/stage2

How should a raid device /dev/md0, with level 0, and devices /dev/hda6, /dev/hda7 be created?

a. mdadm -c /dev/mdO -I 0 -n 2 /dev/hda{6,7}
b. mdadm -c /dev/mdO -I 0 -n 2 /dev/hda6 /dev/hda7
c. mdadm -C /dev/md0 -I 0 -n 2 /dev/hda6 /dev/hda7
d. mdadm -C /dev/mdO -L 0 -n 2 /dev/hda{6,7}

Which of the following files contains the IP address of the gateway?

a. /etc/sysconfig/network
b. /etc/resolv.conf
c. /etc/sysconfig/network-scripts/ifcfg-eth0
d. /etc/sysconfig/network-scripts/gateway

While troubleshooting Xserver, which of the following steps is not required?

a. service xfs restart
b. system-config-display
c. check permissions of /tmp
d. check /usr permissions

What is the correct format for kickstart installation through NFS, when the NFS IP is 192.168.0.254, and the file path on the server is /kickstart/ks.cfg?

a. Linux kickstart=nfs: 192.168.0.254/kickstart/ks.cfg
b. Linux ks=nfs:192.168.0.254/kickstart/ks.cfg
c. linux ks=nfs:192.168.0.254:/kickstai1/ks.cfg
d. linux kickstart=nfs:192.168.0.254:/kickstart/ks.cfg

If the permissions of rc.sysinit are changed from 655 to 444, what will happen during the next reboot?

a. The system will boot but when the password is entered, "access denied" will be displayed
b. The system will not boot
c. The system will show only grub prompt during boot
d. The system will automatically restart, without showing the login prompt after the exact boot process