[SOLVED] BASIC Linux Test / Please give me the answers!

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] BASIC Linux Test / Please give me the answers!

Postby ofbodur » Apr 18th, '13, 00:06

ART A: . Multiple choice questions. Select the best answer. Each correct answer is 1 points. ¼ of your wrong answers subtract a point.
1. This filesystem is normally mounted in read only mode by Linux, although very recent Linux systems have an experimental driver that enables writing:
a. EXT2 b. FAT32 c. NTFS d. VFAT
2. The following Linux distribution requires native installation:
a. Pclinuxonline b. Slackware c. Mandriva One d. Knoppix
3. A native Linux installation on a hard disk requires the following:
a. One primary partition b. Two primary partitions c. Partitions for /home, swap and / d. Any two partitions for / and swap.
4. Which of the following extensions belong to a distribution neutral software package.
a. *.tar.gz b. *.rpm c. *.tgz d. *.deb
5. If you want a command to pipe its result to another command, you use the following construction:
a.comm1 < comm2 b.comm1 > comm2 c.comm1 | comm2 d.comm1>> comm2
6. The following linux command changes the owner of a file:
a. chmod b. chown c. chgrp d. attrib
7. The following linux command changes permissions of a file:
a. chmod b. chown c. chgrp d. attrib
8. In order to include a very large file in two different directories using minimum storage space, we:
a. Copy the file b. Use an interrupt c. Use a soft link d. Use cache memory
9. The following UNIX command renames a file:
a. mv b. ren c. rm d. Cp
10. The filesystem image that is often required for preloading kernel modules that recognize the file system or block device modules is called:
a. bzImage b. vmlinuz c. kernel d. initrd
11. The image in the last question is prepared by the following command:
a. make b. mkinitrd c. make install d. make bzImage
12. If we wish to upgrade the following components, we must keep the old component so that we do not lose our linux system if there is an error:
a. Kernel b. C Library c. Kernel and C libraries d. KDE
13. The mount command must be used in order to:
a. Partition a disk b. Format a disk c. Remove a CDROM d Use a USB drive
14. The fdisk command must be used in order to:
a. Partition a disk b. Format a disk c. Remove a CDROM d Use a USB drive
15. The Linux kernel has the following license:
a. Berkeley b. GPL c. EULA d. Shareware
16. All Linux distributions have a common
a. Startup sequence b. File Hierarchy c. Package Manager d. Kernel
17. If you want to start a job in the background, we use:
a. Control+C b. program & c. Control+Z d. bg
18. If you want to momentarily suspend a foreground job so that we can move it to the background, we use:
a. Control+C b. program & c. Control+Z d. bg
19. If you want to move a suspended job to the background, we use:
a. Control+C b. program & c. Control+Z d. bg
20. If you want to terminate a job that blocks the terminal, we use:
a. kill -9 b. Control+C c. Control+Z d. bg
21. The symbol “=” (= not surrounded by blanks) in bash shell scripts means
a.Strings are identical b. Integers are equal c. Assignment d. piping
22. The symbol “ -eq ” in bash shell scripts means
a.Strings are identical b. Integers are equal c. Assignment d. piping
23. The symbol “$0” in bash shell scripts means
a. Command name b. First argument c. Number of arguments d. All arguments
24. The symbol “$@” in bash shell scripts means
a. Command name b. First argument c. Number of arguments d. All arguments
25. The symbol $# in bash shell scripts means
a. Command name b. First argument c. Number of arguments d. All arguments
26. The following command in shell scripts does not necessarily mean iteration
a. for b. if c. while d. until
27. To see if lines in file file1 start with the character i, we use
a. grep i fıle1 b. grep fıle1 i c. grep ^i fıle1 d. grep –i file1
28. The construction –d name
a. deletes name b. dumps name c. checks if file exists d. checks if file is a directory
29. Obtaining information concerning a specific hardware configuration and producing an appropriate kernel is:
a. Booting b. Configuring c. Installing d. Kernel Compiling
30. A soft link is used for the following in order to avoid losing our system in case of an error when we try to reboot with a new kernel.
a. /boot/vmlinuz b./usr/src/linux c. /etc/X11/xorg.conf d. /etc/lilo.conf
31. A soft link is used for the following in order to avoid losing our system in case of an error when we try to compile a new kernel.
a. /boot/vmlinuz b./usr/src/linux c. /etc/X11/xorg.conf d. /etc/lilo.conf
32. If we start a new kernel compilation using the previous configuration, we use the following:
a. make config b. make mrproper c. make oldconfig d. make clean
33. The commands make config, make menuconfig or make xconfig create or modify the following file:
a. .config b. vmlinuz c. bzImage d. Lilo.conf

PART B: Answer the following questions. Point values are as indicated.
1. (6 points) Give the functions of the following directories in Linux.
a. etc:


b. home:

c. var:

d. usr:

e. proc:

f. lib:


2. (5 points) Please give the meaning of the following entries in the /dev directory g
a. /dev/ttyS1 .
b. /dev/hdb
c. /dev/hda2
d. /dev/sdc
e. /dev/lp0

3. (5 points) Choose five of the steps given below that are used in Linux installation and place them in the correct order:
Boot the installation media,
Check BIOS settings,
Configure your system,
Create root account,
Format hard disk,
Partition hard disk,
Select Software to install







4. (5 points) In a linux system, part of the output of the ls –l command is:
drwxr-xr-x 7 belediye istanbul 4096 Mar 14 19:17 vapurlar/
-rw-r--r-- 1 adalar istanbul 1503 Apr 12 2001 pasabahce

a. The directory name in this list is:

b. The file name in this list is:

c. The group name in this list is:

d. The owner of the file is:

e. belediye has the following permissions on the file:

5. (4 points) Give a Linux equivalent of the following Windows software:
a. Norton Commander:
b. Excel:
c. Notepad:
d. Internet Explorer:
6. (4 points) You run the following four linux commands on your computer: Write what each of the commands do to the right of the command:
a. cal 2000 > file1:

b. ls –l >> file1:

c. cp file1 file2:

d. cp /dev/tty file1:

7. (5 points) We are given the following source tarball: xwpe-1-5.30a.tar.gz. Assume that all necessary development and library packages have been installed. Command line decompression, unarchiving and the standard installation protocol is to be used. Write the statements that you must use:
Decompress: ________________________________.
Unarchive: __________________________________.
Compile the package:__________________ and ___________________.
Install the package ____________________________.

8. (5 points) Write the bash statements which (Hint: watch quotes please)

a. sets the variable HAKEMSPOR to the value SIVRISERVI

b. Echoes $HAKEMSPOR on the screen

c. Echoes the currently assigned value to HAKEMSPOR on the screen.

d. Echoes $1905000 on the screen,

e. Echoes the working directory as The current directory is root by getting the current result of the pwd command.







NAME ____________________
ACM 368 QUIZ 2 COMPUTER PART . 14 April 2008 17:00-17:50
Select any two of the following problems. Each problem is 14 points. You should give the results in electronic form using the USB drive provided.

1. This shell script should prompt the user to input a university from a list that includes isik, itu, odtu, ege, iyte, bu and 7tepe. If the user enters isik, itu, 7tepe or bu the script prints "in Istanbul" , if (s)he enters odtu prints "in Ankara", if (s)he enters ege or iyte prints “in Izmir” otherwise prints "I don’t know".


2. This shell script should be called with a single argument. If the argument exists as a file echo each line and at the end echo the number of lines in the file. If the argument does not exist, echo a message that states this.


3. Write a shell script that accepts three numbers from the command line, gives the sum of all numbers starting with the first and ending with the second that are exactly divisible by (in other words exact multiple of) the third number. For example: if the script is called with ./exer1 20 30 3, the sum 21+24+27+30 must be calculated and echoed.
Last edited by ofbodur on Apr 18th, '13, 14:25, edited 1 time in total.
There is nothing worse than having failed to explain what you believe.
User avatar
ofbodur
 
Posts: 35
Joined: Mar 10th, '13, 12:33
Location: Istanbul

Re: BASIC Linux Test / Please give me the answers!

Postby r0b0tl0ve » Apr 18th, '13, 03:23

Assume someone gives you the answers to this test, you turn it in, and get 100%. Then you get to the next level linux class, and you're faced with questions that stump you. Do you post that online, also? Eventually, you would get to the point where you are treading in deep water with nobody to help you. Don't be that guy.
r0b0tl0ve
 
Posts: 22
Joined: Apr 12th, '13, 02:00

Re: BASIC Linux Test / Please give me the answers!

Postby oj » Apr 18th, '13, 05:13

Just as likely someone answers everything wrong, you turn that in and get 0% and flunk the class.

Either way, what's your motivation for even facing such tests? A student's motivation is the singular factor that delimits outcomes.
oj
 
Posts: 232
Joined: Aug 23rd, '12, 00:22

Re: BASIC Linux Test / Please give me the answers!

Postby ofbodur » Apr 18th, '13, 09:05

I did most of the questions but I just wanted to check that they are true or not? These questions are not official exam questions. They are just similar ones that may come out in the exam.

If you look my past posts you will see that I give much effort for this. I am a new-comer to Linux World, so I think I deserve some help!

Anyway, if you don't want to help, just be that guy.
There is nothing worse than having failed to explain what you believe.
User avatar
ofbodur
 
Posts: 35
Joined: Mar 10th, '13, 12:33
Location: Istanbul

Re: BASIC Linux Test / Please give me the answers!

Postby r0b0tl0ve » Apr 18th, '13, 10:24

here's is a good source for info:

http://www.tldp.org

bear in mind, we *are* trying to help. just maybe not in the way you want.
r0b0tl0ve
 
Posts: 22
Joined: Apr 12th, '13, 02:00

Re: BASIC Linux Test / Please give me the answers!

Postby ofbodur » Apr 18th, '13, 14:25

Thanks ,

I will investigate the source you gave.

The problem is solved.
There is nothing worse than having failed to explain what you believe.
User avatar
ofbodur
 
Posts: 35
Joined: Mar 10th, '13, 12:33
Location: Istanbul


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest