Vidyalelo
Computer Science · Q36

UNIX

Engineering and GATE · Computer Science · question 36

Q36

Which of the following commands is used to identify the type of file by context?

A.
ls
B.
cat
C.
file
Answer
D.
more
E.
None of the above

Answer: Option C

Solution

Answer: Option C
Solution:
In Unix, the file command is used to determine the type of a file by examining its contents and context. When you run file followed by a filename as an argument, it analyzes the file and provides information about its type, such as whether it is a text file, binary file, directory, symbolic link, etc.
So, file is the command used to identify the type of file by context.