Multiple choice

Find out what type of item a file or directory is.

  1. file [path]

  2. ls [path]

  3. cd [path]

  4. pwd

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

The file command examines a file to determine its type, such as whether it is a text file, an executable, or a directory. It looks at file headers rather than just the extension.