Multiple choice technology operating systems

What action does the touch command perform?

  1. Executes the script

  2. Changes the time stamp of existing file

  3. Creates a file of 0 byte.

  4. b and c

  5. All of the above

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The 'touch' command in Unix/Linux performs two functions: 1) If the file doesn't exist, it creates an empty file (0 bytes). 2) If the file already exists, it updates the file's timestamp to the current time. Therefore, option D 'b and c' is correct because touch does both of these things depending on whether the file exists.