Tag: operating systems

Questions Related to operating systems

if[ -f filename ]

  1. checks for the existence of a file

  2. checks for existence of a directory

  3. checks for read permission on a file

  4. checks for write permission on a file


Correct Option: A
  1. cat *.txt -length=10

  2. disp 10 .txt

  3. head -10 *.txt

  4. print 10 *.txt


Correct Option: C

How to search all files in current directory for the word "test"

  1. grep test *

  2. lookup test *

  3. search test *

  4. dir test .


Correct Option: A
  1. ren FILE1 FILE2 - i

  2. ren FILE1 FILE2

  3. cp FILE1 FILE2

  4. mv FILE1 FILE2


Correct Option: D

How to list all files in the current directory?

  1. dir *

  2. dir .

  3. list all

  4. ls -a


Correct Option: D

In which system call we have to use file descriptor to identify the file.

  1. fchmode()

  2. fchmod()

  3. chmod()

  4. All the above.


Correct Option: B

which command gives the operating system's version number?

  1. uname -v

  2. uname -p

  3. uname -s

  4. uname -r


Correct Option: D