file Flashcards
file
file tests each argument in an attempt to classify it.
file -b userfile
This command will attempt to find the file type and the -b option will remove the filename from the output.
-b, –brief, Do not prepend filenames to output lines.
file -i filename
This command will cause the file command to output mime type strings rather than the more traditional human readable ones.
-i, –mime, Output is diplayed in MIME type strings.
file -z compressedfile.gz
This will get the file type info from a file that is inside a compressed file.
-z, –uncompress, Try to look inside compressed files.
file *
file can be used with wildcards to display the file type of all files in a directory.