logo

utils-std

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

realpath.1 (1233B)


  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 2024-03-24
  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 s
  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 s
  39. Do not resolve symlinks.
  40. .It Fl z
  41. Use NULL byte as separator instead of newlines.
  42. .El
  43. .Sh EXIT STATUS
  44. .Ex -std
  45. .Sh SEE ALSO
  46. .Xr realpath 3
  47. .Sh STANDARDS
  48. .Nm
  49. should be compliant with the
  50. IEEE Std 1003.1-2024 (“POSIX.1”)
  51. specification.
  52. .Pp
  53. The options
  54. .Fl n ,
  55. .Fl s
  56. and
  57. .Fl z
  58. and support for multiple
  59. .Ar path
  60. arguments are extensions present for compatibility with existing software.
  61. .Sh AUTHORS
  62. .An Haelwenn (lanodan) Monnier Aq Mt contact+utils@hacktivis.me