Tag: operating systems

Questions Related to operating systems

How can the time stamps of a file be preserved while copying a file?

  1. cp -i

  2. cp -r

  3. cp -p

  4. cp -R


Correct Option: C
  1. ctrl+c then bg

  2. ctrl+z then bg

  3. ctlr+m then bg

  4. ctrl+z then fg


Correct Option: B

"what does the command do? find . -type f -mtime 2"

  1. list all ordinary files in current dir that have been modified within last 24 hours

  2. list all ordinary files in current dir that have been modified within last 4 days

  3. list all ordinary files in current dir that have been modified within last 48 hrs

  4. list all ordinary files in current dir that have been modified within last 2 hrs


Correct Option: C

AI Explanation

To answer this question, let's break down the command and its options:

The command "find" is used to search for files and directories within a given directory hierarchy.

The dot (.) represents the current directory.

The option "-type f" is used to specify that the search should only include ordinary files (not directories or other types of files).

The option "-mtime 2" is used to specify that the search should include files that have been modified within the last 48 hours. The number 2 represents the number of days.

Therefore, the correct answer is C) list all ordinary files in the current directory that have been modified within the last 48 hours.

what is the name of the data structure to maintain file identification?

  1. inode

  2. filter

  3. kernel

  4. shell


Correct Option: A

How to save the output of any command in a file as well as display the same on the VDU?

  1. echo “hello world” > temp.txt

  2. echo “hello world” | tee temp.txt

  3. echo "hello world">tmp.txt|tee tmp.txt

  4. echo "hello world">tmp.txt|print


Correct Option: B
  1. head +10 file

  2. cat file

  3. tail -10 file

  4. head -10 file


Correct Option: D