Os2 Prva Odbrana 2/2

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Dejannrt15416
D
Dejannrt15416
Community Contributor
Quizzes Created: 1 | Total Attempts: 555
Questions: 41 | Attempts: 555

SettingsSettingsSettings
Os2 Prva Odbrana 2/2 - Quiz

.


Questions and Answers
  • 1. 

    Type response below

  • 2. 

    41. Argument „c“ u komandi „tar cvf myfile.tar myfile“ oznacava ?

    • A.

      A. Raspakivanje arhive

    • B.

      B. Listanje sadržaja

    • C.

      C. Prikaz poruke na ekranu

    • D.

      D. Ne znam

    • E.

      E. Kreiranje nove arhive

    Correct Answer
    E. E. Kreiranje nove arhive
    Explanation
    The correct answer is e. Kreiranje nove arhive. In the given command "tar cvf myfile.tar myfile", the "c" option is used to create a new archive file named "myfile.tar" and the "v" option is used to display verbose output while creating the archive. Therefore, the command is used for creating a new archive file.

    Rate this question:

  • 3. 

    42. Kada zadajemo komandu sa arhiviranje sa sledecim parametrima: tar -uvf arhiva.tar ./backup/* izvršavamo sledece operacije:

    • A.

      A. Kreiramo novu arhivu "arhiva.tar" u koju smeštamo sav sadržaj direktorijuma "backup".

    • B.

      B. Raspakujemo "arhiva.tar" u direktorijum "backup".

    • C.

      C. Dodajemo fajlove iz direktorijuma "backup" u arhivu samo ako su noviji od vec postojecih.

    • D.

      D. Ne znam

    • E.

      E. Bezuslovno dodajemo fajlove iz direktorijuma "backup" na kraj arhive.

    Correct Answer
    C. C. Dodajemo fajlove iz direktorijuma "backup" u arhivu samo ako su noviji od vec postojecih.
    Explanation
    The correct answer is c. Dodajemo fajlove iz direktorijuma "backup" u arhivu samo ako su noviji od vec postojecih. This is because the -u option in the tar command is used to update the archive by adding files from the specified directory only if they are newer than the existing files in the archive. The -v option is used to display the progress of the operation, and the -f option is used to specify the name of the archive file. The command "./backup/*" specifies the directory from which the files should be added to the archive.

    Rate this question:

  • 4. 

    43. Koja je razlika izmeu komandi „tar tvf myfile.tar“ i „tar xvf myfile.tar“ ?

    • A.

      A. Komanda „tar tvf myfile.tar“ prikazuje sadržaj arhive a „tar xvf myfile.tar“ raspakuje arhivu

    • B.

      B. Nema razlike obe komande prikazuju sadržaj arhive

    • C.

      C. Ne znam

    • D.

      D. Komanda „tar tvf myfile.tar“ raspakuje arhivu a „tar xvf myfile.tar“ prikazuje sadržaj arhive

    • E.

      E. Nema razlike obe komande raspakuju arhivu

    Correct Answer
    D. D. Komanda „tar tvf myfile.tar“ raspakuje arhivu a „tar xvf myfile.tar“ prikazuje sadržaj arhive
    Explanation
    The correct answer is d. The command "tar tvf myfile.tar" extracts the archive, while the command "tar xvf myfile.tar" displays the contents of the archive.

    Rate this question:

  • 5. 

    44. Koliko nacina rada ima „cpio“?

    • A.

      Option 1

    • B.

      Option 2

    • C.

      3

    • D.

      Option 4

    Correct Answer
    C. 3
    Explanation
    There are three ways to use the "cpio" command.

    Rate this question:

  • 6. 

    45. Nakon unošenja sledecih komandi touch a.a b.b c.c tar -cf arhiva.tar a.a b.b c.c cat /etc/fstab > a.a tar -uf arhiva.tar a.a b.b c.c

    • A.

      A. na kraj arhive je dodat fajl "a.a"

    • B.

      B. na kraj arhive je dodat fajl "fstab"

    • C.

      C. Ne znam

    • D.

      D. ostala je nepromenjena

    • E.

      E. fajl "a.a" je zamenjen fajlom "fstab"

    Correct Answer
    A. A. na kraj arhive je dodat fajl "a.a"
    Explanation
    After executing the given commands, the "tar -cf arhiva.tar a.a b.b c.c" command creates a tar archive named "arhiva.tar" and adds the files "a.a", "b.b", and "c.c" to it. Then, the "cat /etc/fstab > a.a" command overwrites the content of file "a.a" with the contents of "/etc/fstab". Finally, the "tar -uf arhiva.tar a.a b.b c.c" command updates the tar archive by adding the updated file "a.a" to the end of it. Therefore, the correct answer is that the file "a.a" is added to the end of the archive.

    Rate this question:

  • 7. 

    46. Nakon unošenja sledecih komandi: touch a.a b.b c.c tar -cf arhiva.tar a.a b.b c.c tar -rf arhiva.tar a.a b.b c.c U arhivi "arhiva.tar" ce biti:

    • A.

      A. Ne znam

    • B.

      B. 6 datoteka

    • C.

      C. 3 datoteke

    • D.

      D. 1 direktorijum

    • E.

      E. 7 datoteka

    Correct Answer
    B. B. 6 datoteka
    Explanation
    After executing the commands "touch a.a b.b c.c", three files named a.a, b.b, and c.c will be created. Then, the command "tar -cf arhiva.tar a.a b.b c.c" will create a tar archive named arhiva.tar containing these three files. Finally, the command "tar -rf arhiva.tar a.a b.b c.c" will append the same three files to the existing tar archive. Therefore, the arhiva.tar archive will contain a total of six files.

    Rate this question:

  • 8. 

    47. Nakon unosenja sledecih komandi touch fajl chmod 777 fajl tar -cf arhiva.tar fajl tar -tvf arhiva.tar izlaz na ekranu ce nam biti:

    • A.

      A. Ne znam

    • B.

      B. arhiva.tar

    • C.

      C. Obavestenje o gresci

    • D.

      D. -rwxrwxrwx student/student 0 2011-11-09 20:38 arhiva.tar

    • E.

      E. -rwxrwxrwx student/student 0 2011-11-09 20:38 fajl

    Correct Answer
    E. E. -rwxrwxrwx student/student 0 2011-11-09 20:38 fajl
    Explanation
    After executing the given commands, the output on the screen will be the details of the "fajl" file. The "-tvf" option is used with the "tar" command to display the contents of the "arhiva.tar" file, and since "fajl" is the only file included in the archive, its details will be displayed. The details mentioned include the file permissions, owner, size, and timestamp.

    Rate this question:

  • 9. 

    48. Niz komandi mkdir proba cd proba touch a.a b.b c.c ls ?.? > fajlovi cpio –ocvB >arhiva <fajlovi izvršava sledece operacije:

    • A.

      A. Prijavljuje grešku pošto ime fajla ne može biti “??”

    • B.

      B. Kreira arhivu “arhiva” i u nju smešta fajlove “a.a”, “b.b” i “c.c”

    • C.

      C. Kreira arhivu a.a i u nju smešta fajlove “b.b” i “c.c” i zatim sve kompresuje “ocvB” metodom.

    • D.

      D. Ne znam

    • E.

      E. Kreira arhivu “proba” i u nju smešta fajl “arhiva”

    Correct Answer
    B. B. Kreira arhivu “arhiva” i u nju smešta fajlove “a.a”, “b.b” i “c.c”
    Explanation
    The given command sequence first creates a directory named "proba" using the "mkdir" command. Then it navigates into the "proba" directory using the "cd" command. After that, it creates three files named "a.a", "b.b", and "c.c" using the "touch" command.

    The next command "ls ?.? > fajlovi" lists all the files in the current directory that have a single character followed by a dot and another single character. The output of this command is redirected to a file named "fajlovi".

    Finally, the command "cpio -ocvB >arhiva

    Rate this question:

  • 10. 

    49. Prilikom kreiranja arhive komandom "tar", "gzip" kompresovanje se vrši:

    • A.

      A. Iskljucivo korišcenjem drugih alata

    • B.

      B. Ne znam

    • C.

      C. Nikako, "tar" ne može da kompresuje

    • D.

      D. Automatski, bez dodatnih parametara

    • E.

      E. Dodavanjem "-z" parametra

    Correct Answer
    E. E. Dodavanjem "-z" parametra
    Explanation
    The correct answer is e. Dodavanjem "-z" parametra. This means that when creating an archive using the "tar" command, compression is done automatically by adding the "-z" parameter. This parameter tells the "tar" command to use the "gzip" compression algorithm to compress the files in the archive.

    Rate this question:

  • 11. 

    50. Sta radi komanda „tar cvf myfile.tar myfile“ ?

    • A.

      A. Raspakuje arhivu “myfile.tar” u datoteku “myfile”

    • B.

      B. Arhivira datoteku “myfile” u arhivu “myfile.tar”

    • C.

      C. Prikazuje sadržaj arhive “myfile.tar” u datoteci “myfile”

    • D.

      D. Ne znam

    • E.

      E. Otvara arhivu “myfile.tar” kao “myfile”

    Correct Answer
    B. B. Arhivira datoteku “myfile” u arhivu “myfile.tar”
    Explanation
    The command "tar cvf myfile.tar myfile" is used to archive the file "myfile" into the archive "myfile.tar".

    Rate this question:

  • 12. 

    52. Šta radi sledeca komanda? cpio -ivB < backup

    • A.

      A. Proverava ispravnost arhive "backup"

    • B.

      B. Pravi arhivu na osnovu liste iz datoteke "backup"

    • C.

      C. Raspakuje sav sadržaj iz arhive "backup"

    • D.

      D. Ne znam

    • E.

      E. Dodaje sadržaj tekuceg direktorijuma u arhivu "backup"

    Correct Answer
    C. C. Raspakuje sav sadržaj iz arhive "backup"
    Explanation
    The given command "cpio -ivB < backup" is used to extract the contents of the archive "backup". The "-i" option is used to extract files from the archive, and the "-v" option is used to display the progress of the extraction. The "-B" option is used to handle binary files. Therefore, the correct answer is c. Raspakuje sav sadržaj iz arhive "backup".

    Rate this question:

  • 13. 

    54. Dat je deo programskog koda: readlink (link_path, target_path, sizeof (target_path)); Šta predstavlja promenljiva link_path?

    • A.

      A. Putanju do sistemskog direktorijuma funkcije

    • B.

      B. Ne znam

    • C.

      C. Velicinu bafera za putanju datoteke na koju pokazuje link

    • D.

      D. Putanju do simbolickog linka

    • E.

      E. Putanju objekta na koji ukazuje simbolicki link

    Correct Answer
    D. D. Putanju do simbolickog linka
    Explanation
    The variable "link_path" represents the path to the symbolic link.

    Rate this question:

  • 14. 

    53. Komanda „tar tf“ prikazuje imena datoteka koja se nalaze u arhivi?

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    The command "tar tf" is used to list the names of files in an archive. Therefore, the correct answer is true.

    Rate this question:

  • 15. 

    55. Dat je deo programskog koda: fd = open (filename, O_WRONLY | O_CREAT); writev (fd, vec, 2 * argc); close (fd); free (vec); return 0; šta predstavlja promenljiva (fd)?

    • A.

      A. Ne znam

    • B.

      B. Broj elemenata u nizu

    • C.

      C. Niz elemenata strukture iovec

    • D.

      D. Broj bajtova za upis

    • E.

      E. Deskriptor datoteke

    Correct Answer
    E. E. Deskriptor datoteke
    Explanation
    The variable "fd" represents the file descriptor, which is a unique identifier for an open file in a computer system. In this code snippet, "fd" is used to store the file descriptor returned by the "open" function, which opens the specified file with the given flags. The file descriptor is then used as an argument in the "writev" and "close" functions to write data to the file and close the file respectively. Therefore, option e. Deskriptor datoteke (File descriptor) is the correct answer.

    Rate this question:

  • 16. 

    56. Dat je deo programskog koda: sendfile (write_fd, read_fd, &offset, stat_buf.st_size); close (read_fd); close (write_fd); return 0; šta predstavlja (&offset)?

    • A.

      A. Ime fajla u koji se upisuje

    • B.

      B. Dužinu podataka za prebacivanje

    • C.

      C. Ne znam

    • D.

      D. Pomeraj u odnosu na pocetak fajla u koji se upisuje

    • E.

      E. Pomeraj u odnosu na pocetak fajla koji se cita

    Correct Answer
    E. E. Pomeraj u odnosu na pocetak fajla koji se cita
    Explanation
    The correct answer is e. Pomeraj u odnosu na pocetak fajla koji se cita (Offset represents the offset from the beginning of the file being read). In the given code snippet, the sendfile function is used to transfer data from the file represented by the read_fd file descriptor to the file represented by the write_fd file descriptor. The offset parameter is used to specify the starting position in the file being read from where the data should be transferred.

    Rate this question:

  • 17. 

    57. Dat je deo programskog koda: sendfile (write_fd, read_fd, &offset, stat_buf.st_size); close (read_fd); close (write_fd); return 0; šta je (stat_buf.st_size)?

    • A.

      A. Dužina podataka koju je potrebno prebaciti

    • B.

      B. Ne znam

    • C.

      C. Ime fajla u koji se upisuje

    • D.

      D. Pomeraj u odnosu na pocetak fajla u koji se upisuje

    • E.

      E. Pomeraj u odnosu na pocetak fajla koji se cita

    Correct Answer
    A. A. Dužina podataka koju je potrebno prebaciti
    Explanation
    The correct answer is a. Dužina podataka koju je potrebno prebaciti. In the given code, the function sendfile is used to transfer data from one file descriptor to another. The third argument of the function, &offset, is a pointer to a variable that specifies the offset in the source file from where the data transfer should start. The fourth argument, stat_buf.st_size, is the size of the data to be transferred. Therefore, the correct answer is that stat_buf.st_size represents the length of the data that needs to be transferred.

    Rate this question:

  • 18. 

    58. Dat je deo programskog koda: fd = open (filename, O_WRONLY | O_CREAT); writev (fd, vec, 2 * argc); close (fd); free (vec); return 0; šta predstavlja promenljiva (vec)?

    • A.

      A. Ne znam

    • B.

      B. Niz elemenata strukture iovec

    • C.

      C. Deskriptor datoteke

    • D.

      D. Broj bajtova za upis

    • E.

      E. Broj elemenata u nizu

    Correct Answer
    B. B. Niz elemenata strukture iovec
    Explanation
    The variable "vec" represents an array of elements of the structure iovec. In the given code, this array is passed as an argument to the writev function, which is used to write data to a file. The writev function takes the file descriptor (fd), the array (vec), and the number of elements in the array (2 * argc) as arguments. Therefore, the variable "vec" represents an array of elements that will be written to the file.

    Rate this question:

  • 19. 

    59. Koja je mana sistemskog poziva write?

    • A.

      A. Ne znam

    • B.

      B. Može da zapiše samo kontinualnu oblast memorije u datoteku.

    • C.

      C. Moramo da podesimu strukturu podataka pre upisa - iovec

    • D.

      D. Može da zapiše diskontinualne oblasti memorije u datoteku.

    • E.

      E. Ne može da zapiše kontinunalnu oblast memorije u datoteku.

    Correct Answer
    B. B. Može da zapiše samo kontinualnu oblast memorije u datoteku.
    Explanation
    The correct answer is b. Može da zapiše samo kontinualnu oblast memorije u datoteku. This means that the write system call can only write a continuous area of memory to a file. It is unable to write non-continuous areas of memory to a file.

    Rate this question:

  • 20. 

    60. Kombinovanje funkcija opendir, readdir i closedir omogucava:

    • A.

      A. Pretragu sadržaja direktorijuma po kljucnim recima

    • B.

      B. Ne znam

    • C.

      C. Izlistavanje sadržaja direktorijuma

    • D.

      D. Kreiranje i brisanje direktorijuma

    • E.

      E. Prikazivanje prava pristupa direktorijuma

    Correct Answer
    C. C. Izlistavanje sadržaja direktorijuma
    Explanation
    The combination of opendir, readdir, and closedir functions allows for the listing of the contents of a directory. These functions are commonly used in programming to navigate and manipulate directories in a file system. opendir is used to open a directory, readdir is used to read the contents of the directory one by one, and closedir is used to close the directory after the listing is complete. Therefore, the correct answer is c. Izlistavanje sadržaja direktorijuma, which translates to listing the contents of a directory.

    Rate this question:

  • 21. 

    61. Sistemski poziv access služi za:

    • A.

      A. Otvaranje datoteke

    • B.

      B. Pristupanje datoteci

    • C.

      C. Ne znam

    • D.

      D. Odreivanje prava pristupa pozivnog procesa datoteci

    • E.

      E. Zakljucavanje datoteke prilikom pristupa

    Correct Answer
    D. D. Odreivanje prava pristupa pozivnog procesa datoteci
    Explanation
    The correct answer is d. Određivanje prava pristupa pozivnog procesa datoteci. This means that the access system call is used to determine the access rights of the calling process to a file. It allows the process to check if it has the necessary permissions to perform certain operations on the file, such as reading, writing, or executing.

    Rate this question:

  • 22. 

    62. Sistemski poziv readlink služi za:

    • A.

      A. Ne znam

    • B.

      B. Prikaz sadržaja datoteke na koju pokazuje simbolicki link

    • C.

      C. Prikaz imena objekta na koji pokazuje simbolicki link

    • D.

      D. Otvaranje datoteke na koju pokazuje simbolicki link

    • E.

      E. Prikazivanje prava pristupa simbolickog linka

    Correct Answer
    C. C. Prikaz imena objekta na koji pokazuje simbolicki link
    Explanation
    The correct answer is c because the readlink system call is used to display the name of the object that a symbolic link points to. It does not display the content of the file or open the file, but rather retrieves the name of the target object.

    Rate this question:

  • 23. 

    63. Sistemski poziv sendfile služi za kopiranje podataka iz jednog deskriptora datoteke u drugi. Prednost ove funkcije je:

    • A.

      A. Ne znam

    • B.

      B. Podržava posrednicki bafer

    • C.

      C. Povecava sigurnost kopiranja

    • D.

      D. Eliminiše posrednicki bafer

    Correct Answer
    D. D. Eliminiše posrednicki bafer
    Explanation
    The correct answer is d. Eliminiše posrednicki bafer. This means that the sendfile system call eliminates the need for a intermediary buffer when copying data from one file descriptor to another. This can improve performance and efficiency by reducing the number of data copies and memory operations required.

    Rate this question:

  • 24. 

    64. Sistemski poziv stat omogucava:

    • A.

      A. Prikazivanje statistika pristupa datoteci

    • B.

      B. Prikazivanje sadržaja datoteke

    • C.

      C. Ne znam

    • D.

      D. Prikazivanje informacija o datoteci iz i-node strukture

    • E.

      E. Prikazivanje putanje do datoteke

    Correct Answer
    D. D. Prikazivanje informacija o datoteci iz i-node strukture
    Explanation
    The correct answer, d, states that the system call "stat" allows for displaying information about a file from the i-node structure. This means that when the "stat" system call is used, it retrieves and displays various information about a file, such as its size, permissions, owner, creation and modification dates, and more. It provides detailed metadata about the file stored in the i-node structure, allowing users to access important information about the file.

    Rate this question:

  • 25. 

    65. U koliko zadata datoteka postoji, posle izvršavanja sledeceg dela programskog koda rval = access (path, F_OK) promenljiva rval ima vrednost:

    • A.

      A. true

    • B.

      B. 0

    • C.

      C. Ne znam

    • D.

      D. 1

    • E.

      E. -1

    Correct Answer
    B. B. 0
    Explanation
    After executing the given code, the variable "rval" will have the value of 0 if the file specified by the "path" variable exists. This is because the "access" function with the "F_OK" flag checks if the file exists, and returns 0 if it does.

    Rate this question:

  • 26. 

    66. U koliko posle izvršavanja sledeceg dela programskog koda rval = access (path, W_OK) promenljiva rval ima vrednost 0 proces:

    • A.

      A. Ima pravo citanja zadate datoteke

    • B.

      B. Ne znam

    • C.

      C. Traži da pristupi nepostojecoj datoteci

    • D.

      D. Nema pravo pristupa zadatoj datoteci

    • E.

      E. Ima pravo upisivanja u zadatu datoteku

    Correct Answer
    E. E. Ima pravo upisivanja u zadatu datoteku
    Explanation
    After executing the given code, if the variable "rval" has a value of 0, it means that the access function was successful and the program has the permission to write to the specified file. Therefore, the correct answer is e. Ima pravo upisivanja u zadatu datoteku (It has the permission to write to the specified file).

    Rate this question:

  • 27. 

    67. Funkcija chdir omogucava:

    • A.

      B. Promenu imena direktorijuma koji je zadat kao argument

    • B.

      C. Promenu trenutnog radnog direktorijuma

    • C.

      D. Ne znam

    • D.

      E. Promenu prava pristupa direktorijumu

    Correct Answer
    B. C. Promenu trenutnog radnog direktorijuma
    Explanation
    The correct answer is c. Promenu trenutnog radnog direktorijuma. The chdir function in programming allows for changing the current working directory. This means that the function can be used to navigate to a different directory within the file system, making it the correct answer in this context.

    Rate this question:

  • 28. 

    68. Funkcije mkdir i rmdir omogucavaju:

    • A.

      A. Pretragu i uporeivanje direktorijuma

    • B.

      B. Ne znam

    • C.

      C. Pakovanje i raspakivanje direktorijuma

    • D.

      D. Premeštanje i umnožavanje direktorijuma

    • E.

      E. Pravljenje i brisanje direktorijuma

    Correct Answer
    E. E. Pravljenje i brisanje direktorijuma
    Explanation
    The functions mkdir and rmdir enable the creation and deletion of directories.

    Rate this question:

  • 29. 

    69. Upotreba sistemskog poziva sendfile prilikom kopiranja je efikasnija od pozivanja Linuks programa cp?

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    Using the system call sendfile for copying is more efficient than calling the Linux program cp.

    Rate this question:

  • 30. 

    70. Povratna vrednost sistemskog poziva iovec je broj upisanih bajtova.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    The given statement is true. The return value of the system call iovec is the number of bytes written. This means that when the iovec system call is executed, it will return the total number of bytes that have been successfully written to the output.

    Rate this question:

  • 31. 

    71. Prilikom korišcenja sistemskog poziva fcntl za zakljucavanje datoteka ista datoteka MOŽE biti u isto vreme zakljucana i za citanje i za pisanje (read-lock i write-lock).

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    When using the fcntl system call for file locking, the same file CANNOT be locked for both reading and writing at the same time.

    Rate this question:

  • 32. 

    72. Funkcija getcwd omogucava ispis putanje trenutnog radnog direktorijuma.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    The statement is true because the function getcwd in programming allows for the retrieval and printing of the current working directory path.

    Rate this question:

  • 33. 

    73. Funkcija sendfile pri kopiranju podataka može iskljucivo da kopira celokupni sadržaj datoteke u novu.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    The statement is false because the sendfile function can copy a specified portion of the file's content to a new file, rather than copying the entire content.

    Rate this question:

  • 34. 

    74. Shell programi (shell script) se pre izvršavanja moraju prevoditi (compile).

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    Shell programs, also known as shell scripts, do not need to be compiled before execution. They are interpreted by the shell, which reads and executes the commands directly. This is different from compiled languages like C or Java, where the source code needs to be compiled into machine code before it can be executed. Shell scripts are written in a scripting language, such as Bash, and can be executed directly by the shell without the need for compilation. Therefore, the statement "Shell programs se pre izvršavanja moraju prevoditi (compile)" is false.

    Rate this question:

  • 35. 

    75. Napisali smo sledeci shell program: #!/bin/bash case $1 in "smer") echo "RT";; "godina") echo "II";; "status") echo "SF";; *) echo "*** Pogresan argument ***";; esac koji argument treba da damo pri pokretanju ovog programa da bi izlaz bio "RT"?

    • A.

      A. RT

    • B.

      B. Ne znam

    • C.

      C. status

    • D.

      D. godina

    • E.

      E. smer

    Correct Answer
    E. E. smer
    Explanation
    The correct answer is e. smer. In the given shell program, the case statement checks the value of $1 (the first argument passed to the program). If it matches "smer", it will echo "RT". Therefore, to get the output "RT", we need to pass "smer" as the argument when running the program.

    Rate this question:

  • 36. 

    76. Komanda koja nam omogucava ispisivanje vrednosti neke sistemske promenljive je:

    • A.

      A. $IMEPROMENLJIVE

    • B.

      B. read $IMEPROMENLJIVE

    • C.

      C. Ne znam

    • D.

      D. echo $IMEPROMENLJIVE

    • E.

      E. open $IMEPROMENLJIVE

    Correct Answer
    D. D. echo $IMEPROMENLJIVE
    Explanation
    The correct answer is d. echo $IMEPROMENLJIVE. The echo command is used in programming languages to display text or the value of a variable. In this case, it is used to print the value of the system variable $IMEPROMENLJIVE.

    Rate this question:

  • 37. 

    77. Pravilno dodeljivanje vrednosti promenljivoj u Linuksu je:

    • A.

      A. Ne znam

    • B.

      B. VAR=10

    • C.

      C. 10=VAR

    • D.

      D. VAR equ 10

    • E.

      E. VAR == 10

    Correct Answer
    B. B. VAR=10
    Explanation
    The correct answer is b. VAR=10. In Linux, variables are assigned values using the syntax variable_name=value. Therefore, to assign the value 10 to the variable VAR, the correct syntax is VAR=10.

    Rate this question:

  • 38. 

    78. Moguci izlaz sledece komande echo "Današnji datum: `date`" je:

    • A.

      A. Današnji datum: Fri Apr 22 16:30:35 CEST 2011

    • B.

      B. "Današnji datum: `date`"

    • C.

      C. Date Fri Apr 22 16:30:35 CEST 2011

    • D.

      D. Ne znam

    • E.

      E. Današnji datum:

    Correct Answer
    A. A. Današnji datum: Fri Apr 22 16:30:35 CEST 2011
    Explanation
    The correct answer is a. Današnji datum: Fri Apr 22 16:30:35 CEST 2011. This is because the command "echo" is used to display the output, and the portion "`date`" is a command substitution that will be replaced with the current date and time when the command is executed. Therefore, the output will be "Današnji datum: Fri Apr 22 16:30:35 CEST 2011".

    Rate this question:

  • 39. 

    79. Komanda u Linuks terminalu expr 5+8 ce po izvršavanju ispisati:

    • A.

      A. Ne znam

    • B.

      B. 12

    • C.

      C. 13

    • D.

      D. false

    • E.

      E. error

    Correct Answer
    C. C. 13
    Explanation
    The command "expr 5+8" in the Linux terminal is used to evaluate arithmetic expressions. In this case, it is adding 5 and 8 together. The result of this addition is 13, which is why the correct answer is c. 13.

    Rate this question:

  • 40. 

    80. Ako izvršimo sledecu komandu u terminalu cd ~ preci cemo u:

    • A.

      A. Direktorijum C:\~

    • B.

      B. Ne znam

    • C.

      C. Direktorijum .\~

    • D.

      D. Direktorijum \home\

    • E.

      E. Svoj home direktorijum

    Correct Answer
    E. E. Svoj home direktorijum
    Explanation
    The command "cd ~" is used to navigate to the user's home directory. The "~" represents the home directory shortcut. Therefore, the correct answer is e. Svoj home direktorijum, which translates to "your home directory" in English.

    Rate this question:

  • 41. 

    81. Šta ce se desiti po izvršavanju sledece komande u Linuks terminalu: read var1

    • A.

      A. Sistem ce ispisati vrednost promenljive var1

    • B.

      B. Ne znam

    • C.

      C. Sistem ce ocekivati da na tastaturi unesemo vrednost za promenljivu var1

    • D.

      D. Sistem ce zapoceti upis u datoteku var1

    • E.

      E. Sistem ce ispisati sadržaj datoteke var1

    Correct Answer
    C. C. Sistem ce ocekivati da na tastaturi unesemo vrednost za promenljivu var1
    Explanation
    After executing the command "read var1" in the Linux terminal, the system will expect the user to enter a value for the variable var1 using the keyboard. This command is used to read input from the user and store it in the specified variable. It does not print the value of the variable or write it to a file. Therefore, option c is the correct answer.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 22, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Dec 06, 2018
    Quiz Created by
    Dejannrt15416
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.