logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git/

realpath.1 (1382B)


  1. .\" utils-std: Collection of commonly available Unix tools
  2. .\" Copyright 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. .\" SPDX-License-Identifier: MPL-2.0
  4. .Dd September 27, 2024
  5. .Dt REALPATH 1
  6. .Os
  7. .Sh NAME
  8. .Nm realpath
  9. .Nd print resolved path
  10. .Sh SYNOPSIS
  11. .Nm
  12. .Op Fl E Ns | Ns Fl e
  13. .Op Fl n Ns | Ns Fl z
  14. .Op Fl qs
  15. .Ar path...
  16. .Sh DESCRIPTION
  17. The
  18. .Nm
  19. utility resolves
  20. .Pa \&. ,
  21. .Pa .. ,
  22. and symlinks used in each
  23. .Ar path
  24. to print an absolute pathname.
  25. .Pp
  26. When no flags are passed, this implementation assumes the behavior of
  27. .Fl E .
  28. .Sh OPTIONS
  29. .Bl -tag -width ee
  30. .It Fl E
  31. Do not fail when the final path component does not exists and it's parent is a directory.
  32. .It Fl e
  33. Fail when
  34. .Ar path
  35. does not exists.
  36. .It Fl n
  37. Do not print a trailing separator.
  38. .It Fl q
  39. Do not print errors/warnings when
  40. .Xr realpath 3
  41. fails.
  42. Messages about other errors, such as bad usage, are still printed.
  43. .It Fl s
  44. Do not resolve symlinks.
  45. .It Fl z
  46. Use NULL byte as separator instead of newlines.
  47. .El
  48. .Sh EXIT STATUS
  49. .Ex -std
  50. .Sh SEE ALSO
  51. .Xr realpath 3
  52. .Sh STANDARDS
  53. .Nm
  54. should be compliant with the
  55. IEEE Std 1003.1-2024 (“POSIX.1”)
  56. specification.
  57. .Pp
  58. The options
  59. .Fl n ,
  60. .Fl q ,
  61. .Fl s ,
  62. .Fl z ,
  63. and support for multiple
  64. .Ar path
  65. arguments are extensions present for compatibility with existing software.
  66. .Sh AUTHORS
  67. .An Haelwenn (lanodan) Monnier Aq Mt contact+utils@hacktivis.me