The difference between a named pipe and a regular file in Unix is that

2018

The difference between a named pipe and a regular file in Unix is that

  1. A.

    Unlike a regular file, named pipe is a special file

  2. B.

    The data in a pipe is transient, unlike the content of a regular file

  3. C.

    Pipes forbid random accessing, while regular files do allow this.

  4. D.

    All of the above

Attempted by 102 students.

Show answer & explanation

Correct answer: D

In Unix, named pipes (FIFOs) are classified as special files rather than regular files. Unlike regular files which store data persistently on disk, data in a pipe is transient and lost once read. Furthermore, pipes enforce sequential access and do not support random seeking, whereas regular files allow both. Since all listed statements accurately distinguish named pipes from regular files, the correct choice encompasses all these differences.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Isro