Giriş
Hiçbir seçenek ile kullanılmazsa dosya ismini bir kere daha yazar. Şöyle yaparız.
-b seçeneği
brief anlamına gelir. Dosya ismini yazmaz. Şöyle yaparız.
mime ve encoding bilgisini verir. Açıklaması şöyle.
Şöyle yaparız.
Sadece mime tipini verir. Şöyle yaparız.
Hiçbir seçenek ile kullanılmazsa dosya ismini bir kere daha yazar. Şöyle yaparız.
$ file some.pdf
some.pdf: PDF document, version 1.4Resmin renk uzayını belirlemek için file komutu kullanılabilir. Örnek'te komutun RGB döndürüldüğü görülebilir.
$ file file.png
file.png: PNG image data, 734 x 73, 8-bit/color RGB, non-interlacedExit Status
Açıklaması şöyle
EXIT STATUS
     file will exit with 0 if the operation was successful or >0 if an error was encoun‐
     tered.  The following errors cause diagnostic messages, but don't affect the pro‐
     gram exit code (as POSIX requires), unless -E is specified:
           •   A file cannot be found
           •   There is no permission to read a file
           •   The file type cannot be determinedÖrnek
Şöyle yaparız
$ file -E saonteuh; echo $?
saonteuh: ERROR: cannot stat `saonteuh' (No such file or directory)
1brief anlamına gelir. Dosya ismini yazmaz. Şöyle yaparız.
$ file -b some.pdf
PDF document, version 1.4mime ve encoding bilgisini verir. Açıklaması şöyle.
The file -bi command will output the MIME type of the file. For a shell script on Linux (and most other systems), this would be something like
text/x-shellscript; charset=us-asciiŞöyle yaparız.
$ file -bi some.pdf
application/pdf; charset=binarySadece mime tipini verir. Şöyle yaparız.
$ file -b --mime-type some.pdf
application/pdf 
Hiç yorum yok:
Yorum Gönder