file COMMAND:
file command tells you if the object you are looking at is a file or a directory.
SYNTAX:
The Syntax is
file [options] directoryname/filename
OPTIONS:
-c
Check the magic file for format errors. For reasons of efficiency, this validation is normally not carried out.
-h
Do not follow symbolic links.
-m
Use mfile as an alternate magic file.
-f
ffile contains a list of the files to be examined.
EXAMPLE:
file *.txt
Output:
aprlist.txt: ASCII English text
cal.txt: ASCII text
marchlist.txt: ASCII English text
text.txt: ASCII text
Prints the 'txt' files.
file nimi
Output:
nimi: directory
Print the given object nimi is an directory or file.
Find LINUX Commands... Hope you enjoy this tutorial. We welcome your Valuable feedbacks or suggestions on this LINUX / UNIX cmd reference. This is a copyright content.