2015-12-28 22:47:17 -05:00
|
|
|
# file
|
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
> Determine file type.
|
2021-07-09 16:45:55 +02:00
|
|
|
> More information: <https://manned.org/file>.
|
2015-12-28 22:47:17 -05:00
|
|
|
|
2017-12-13 12:09:21 +00:00
|
|
|
- Give a description of the type of the specified file. Works fine for files with no file extension:
|
2015-12-28 22:47:17 -05:00
|
|
|
|
2022-12-06 07:47:56 +01:00
|
|
|
`file {{path/to/file}}`
|
2015-12-28 22:47:17 -05:00
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- Look inside a zipped file and determine the file type(s) inside:
|
2015-12-28 22:47:17 -05:00
|
|
|
|
man, sudo, mount, file, curl, ps, seq, gdb, cat, upower, cal: add option placeholders (#15915)
2025-03-11 08:07:57 +02:00
|
|
|
`file {{[-z|--uncompress]}} {{foo.zip}}`
|
2016-01-08 20:15:59 +11:00
|
|
|
|
2016-01-13 12:04:46 +01:00
|
|
|
- Allow file to work with special or device files:
|
2016-01-08 20:15:59 +11:00
|
|
|
|
man, sudo, mount, file, curl, ps, seq, gdb, cat, upower, cal: add option placeholders (#15915)
2025-03-11 08:07:57 +02:00
|
|
|
`file {{[-s|--special-files]}} {{path/to/file}}`
|
2016-01-08 20:15:59 +11:00
|
|
|
|
2016-01-13 12:04:46 +01:00
|
|
|
- Don't stop at first file type match; keep going until the end of the file:
|
2016-01-08 20:15:59 +11:00
|
|
|
|
man, sudo, mount, file, curl, ps, seq, gdb, cat, upower, cal: add option placeholders (#15915)
2025-03-11 08:07:57 +02:00
|
|
|
`file {{[-k|--keep-going]}} {{path/to/file}}`
|
2017-02-16 14:09:06 -05:00
|
|
|
|
2022-10-17 13:18:15 +05:30
|
|
|
- Determine the MIME encoding type of a file:
|
2017-02-16 14:09:06 -05:00
|
|
|
|
man, sudo, mount, file, curl, ps, seq, gdb, cat, upower, cal: add option placeholders (#15915)
2025-03-11 08:07:57 +02:00
|
|
|
`file {{[-i|--mime]}} {{path/to/file}}`
|