Quote:
So not able to attach sample file here.
|
Is it at least possible to supply the first dozen bytes (using
hexdump)? What language are the files in?
Quote:
I have some files which are UTF8 and have first line as blank. It shows as data file by "file" command. If I remove the blank line, it shows it as UTF8 text file.
|
I can't replicate this - I have tried with/without blank lines, and with/without byte order marks, and
file identifies the file correctly (ie, never falling back to 'data').
You don't supply any details about the system (versions etc). I would assume this is on a Linux system?
Quote:
Do anyone have any idea how to do it with any other command?
|
You could make use of
strings to look for printable text, or
hexdump to look for a byte order mark (if there is one), but
file is really the correct tool for the job.