snippetbashTip
file — Determine file type. See also: `stat`. More information: <https://manned.org/file>.
Viewed 0 times
commanddetermineclifiletypeseealso
Problem
How to use the
file command: Determine file type. See also: stat. More information: <https://manned.org/file>.Solution
file — Determine file type. See also: stat. More information: <https://manned.org/file>.Give a description of the type of the specified file:
file {{path/to/file}}Look inside a zipped file and determine the file type(s) inside:
file {{[-z|--uncompress]}} {{path/to/file.zip}}Allow
file to work with special or device files:file {{[-s|--special-files]}} {{path/to/file}}Don't stop at first file type match; keep going until the end of the file:
file {{[-k|--keep-going]}} {{path/to/file}}Determine the MIME encoding type of a file:
file {{[-i|--mime]}} {{path/to/file}}Code Snippets
Give a description of the type of the specified file
file {{path/to/file}}Look inside a zipped file and determine the file type(s) inside
file {{[-z|--uncompress]}} {{path/to/file.zip}}Allow `file` to work with special or device files
file {{[-s|--special-files]}} {{path/to/file}}Don't stop at first file type match; keep going until the end of the file
file {{[-k|--keep-going]}} {{path/to/file}}Determine the MIME encoding type of a file
file {{[-i|--mime]}} {{path/to/file}}Context
tldr-pages: common/file
Revisions (0)
No revisions yet.