shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell-script] Como testar se o arquivo é binário


From: Leandro Santiago da Silva
Subject: Re: [shell-script] Como testar se o arquivo é binário
Date: Wed, 10 Oct 2007 09:48:17 -0300
User-agent: Thunderbird 2.0.0.6 (X11/20070728)

Veja a saída do comando file:
$ file arquivo.txt -i -b # -i para exibir o tipo mime
text/plain; charset=us-ascii

$ file /usr/bin/ls -i -b
application/x-not-regular-file

$ file arquivo.odt -i -b
application/x-zip

Assim, é possível você filtrar arquivos segundo o critério do seu tipo.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]