From 13aebf0c20904d1676b1d2db8fd5346abf6fe21d Mon Sep 17 00:00:00 2001 From: Matt Sephton Date: Wed, 13 Dec 2017 12:09:21 +0000 Subject: [PATCH] split file command as it takes different args on macOS --- pages/{common => linux}/file.md | 2 +- pages/osx/file.md | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) rename pages/{common => linux}/file.md (79%) create mode 100644 pages/osx/file.md diff --git a/pages/common/file.md b/pages/linux/file.md similarity index 79% rename from pages/common/file.md rename to pages/linux/file.md index fa1ce4c48..785cee746 100644 --- a/pages/common/file.md +++ b/pages/linux/file.md @@ -2,7 +2,7 @@ > Determine file type. -- Give a description of the type of the specified file. Works fine for files with no file extension: +- Give a description of the type of the specified file. Works fine for files with no file extension: `file {{filename}}` diff --git a/pages/osx/file.md b/pages/osx/file.md new file mode 100644 index 000000000..841d703d3 --- /dev/null +++ b/pages/osx/file.md @@ -0,0 +1,23 @@ +# file + +> Determine file type. + +- Give a description of the type of the specified file. Works fine for files with no file extension: + +`file {{filename}}` + +- Look inside a zipped file and determine the file type(s) inside: + +`file -z {{foo.zip}}` + +- Allow file to work with special or device files: + +`file -s {{filename}}` + +- Don't stop at first file type match; keep going until the end of the file: + +`file -k {{filename}}` + +- Determine the mime encoding type of a file: + +`file -I {{filename}}`