diff options
| author | Christos Zoulas <christos@zoulas.com> | 2017-12-25 15:08:44 +0000 |
|---|---|---|
| committer | Christos Zoulas <christos@zoulas.com> | 2017-12-25 15:08:44 +0000 |
| commit | 9c495f2a5d6b4f40862c939fe58cc80905532331 (patch) | |
| tree | bf8ca69eeb64d3794c7e4dbf5b9cee26211b3d3c /doc | |
| parent | fc4b6e349904aa2e46164975f0e381a21037ee9a (diff) | |
| download | file-git-9c495f2a5d6b4f40862c939fe58cc80905532331.tar.gz | |
- remove magic.mime mention, it was only kept for compatibility and
the code will eventually be removed
- add a section explaining the exit values
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/file.man | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/doc/file.man b/doc/file.man index 88ed7d4d..6f284226 100644 --- a/doc/file.man +++ b/doc/file.man @@ -1,5 +1,5 @@ -.\" $File: file.man,v 1.126 2017/10/13 15:37:03 christos Exp $ -.Dd October 13, 2017 +.\" $File: file.man,v 1.127 2017/12/25 15:08:44 christos Exp $ +.Dd December 25, 2017 .Dt FILE __CSECTION__ .Os .Sh NAME @@ -375,6 +375,25 @@ prints just the filename followed by a NUL followed by the description .It Fl -help Print a help message and exit. .El +.Sh EXIT STATUS +.Nm +will exit with +.Dv 0 +if the operation was successful or +.Dv >0 +if an error was encountered. +The following errors cause diagnostic messages, but don't affect the program +exit code (as POSIX requires), unless +.Fl E +is specified: +.Bl -bullet -compact -offset indent +.It +A file cannot be found +.It +There is no permission to read a file +.It +The file type cannot be determined +.El .Sh FILES .Bl -tag -width __MAGIC__.mgc -compact .It Pa __MAGIC__.mgc @@ -394,11 +413,6 @@ will not attempt to open adds .Dq Pa .mgc to the value of this variable as appropriate. -However, -.Pa file -has to exist in order for -.Pa file.mime -to be considered. The environment variable .Ev POSIXLY_CORRECT controls (on systems that support symbolic links), whether |
