m_razesh
asked on
FILE COMMAND
Hi
I am new to UNIX.
I want to clarify one thing--
an eg is given as-- $ file monday reports
and the book states monday : text file
reports : directory.. How can we know tht its a text file?and directory?
and same as another $ file calc.c proj newdata
here calc.c is C prog and proj - executable file and newdata is empty file.
So how to classify them ..On what basis are they classified?..
I am new to UNIX.
I want to clarify one thing--
an eg is given as-- $ file monday reports
and the book states monday : text file
reports : directory.. How can we know tht its a text file?and directory?
and same as another $ file calc.c proj newdata
here calc.c is C prog and proj - executable file and newdata is empty file.
So how to classify them ..On what basis are they classified?..
man magic
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
> How can we know tht its a text file?and directory?
not with the file command, obviously (see its name:-)
use ls -l
> here calc.c is C prog and proj - executable file and newdata is empty file.
what do you mean?
If a file is executable (see ls -l) or not doesn't matter the file command.