Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
File (command)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Usage== The SUS<ref>{{Cite web |url=https://pubs.opengroup.org/onlinepubs/9799919799/utilities/file.html |title=The Open Group Base Specifications Issue 8 β ''file'' command |access-date=2025-05-05}}</ref> mandates the following command-line options: * <code>-M ''file''</code>, prevents the default position-sensitive and context-sensitive tests in favor of the tests specified in a specially formatted file * <code>-m ''file''</code>, same as for <code>-M</code>, but with tests in addition to the default * <code>-d</code>, selects default position-sensitive and context-sensitive tests; this is the default behavior unless <code>-M</code> or <code>-m</code> are specified * <code>-h</code>, do not dereference [[symbolic link]]s that point to an existing file or directory * <code>-L</code>, dereference the symbolic link that points to an existing file or directory * <code>-i</code>, do not classify the file further than to report as: nonexistent, a block special file, a character special file, a directory, a [[named pipe|FIFO]], a socket, a symbolic link, or a regular file; the Ian Darwin and OpenBSD versions behave differently with this option and instead output an [[Internet media type]] ("[[MIME]] type") identifying the recognized file format Implementations may add extra options. Ian Darwin's implementation adds <code>-s</code> 'special files', <code>-k</code> 'keep-going' or <code>-r</code> 'raw', among many others.<ref name=linux>{{man|1|file|Linux}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)