[wellylug] using "file"

andrej at paradise.net.nz andrej at paradise.net.nz
Tue Sep 14 12:15:27 NZST 2004


Quoting "E.Chalaron" <e.chalaron at xtra.co.nz>:

> Hi all
> 
> I am trying to use file for detecting applications.
> As I want to use that in a cron job, I was wondering if there might be 
> something simpler from the usual reply from file :
> 
> let's say :
> file -b file.doc gives "Microsoft Office Document"
> 
> My question is : can I get a number rather than a couple of words ? I
> guess I 
> can always modify /usr/share/magic but I'm not really keen doing that.
> Other question : how reliable file is ? so far anything as doc or xls is
> described as Microsoft Office Document... not precise enough for what I
> want to do..
You answered your second question with the answer to question
one you didn't like ... edit magic.


> Thanks
> E.
Cheers,
Andrej




More information about the wellylug mailing list