REALPATH(1)

πŸ“¦ version 0.12.0, in arch rolling

πŸ’… realpath(1) β€” the General Commands Manual, but make it cute

okay so bestie, welcome to realpath β€” it lives in the General Commands Manual section (that's section 1, iykyk) and honestly? it's that girl. she takes a messy path and gives you the resolved version. no cap.


✨ NAME ✨

realpath β€” print the resolved path 🫢

like literally. that's the whole job. she resolves. she prints. iconic.


πŸŽ€ SYNOPSIS πŸŽ€

realpath [OPTION]... FILE...

options first, then your FILE...s β€” as many as you want, she's not gatekeeping πŸ’…


🌸 DESCRIPTION 🌸

Print the resolved path ✨

that's the vibe. you hand her a path, she hands you back the real one. main character energy fr fr.


πŸ’– OPTIONS πŸ’–

  • -q, --quiet β€” do not print warnings for invalid paths 🫢 she's staying unbothered, she's keeping it cute, no drama in the output.
  • -s, --strip β€” only strip . and .. components, but don't resolve symbolic links. so like, tidying only β€” no symlink detective work. lowkey the lazy-girl option and we respect her for it.
  • -z, --zero β€” separate output filenames with \0 rather than newline. null bytes instead of newlines β€” perfect for when your filenames are chaotic and contain newlines (unhinged behaviour, but okay πŸ’€).
  • -L, --logical β€” resolve .. components before symlinks. like, deal with the ..s first, then the symlinks. order matters bestie!!
  • -P, --physical β€” resolve symlinks as encountered (default). this is the default so she's already doing this unless you tell her otherwise πŸ‘‘
  • -E, --canonicalize β€” all but the last component must exist (default). so everything except the very last bit has to actually be there. also the default, she's generous like that.
  • -e, --canonicalize-existing β€” canonicalize by following every symlink in every component of the given name recursively, all components must exist. every single component has to exist, no exceptions, she is checking βœ‹
  • -m, --canonicalize-missing β€” canonicalize by following every symlink in every component of the given name recursively, without requirements on components existence. chill mode: she doesn't need anything to actually exist, she's just doing the math 🧚
  • --relative-to <DIR> β€” print the resolved path relative to DIR. so you get a path that's relative to DIR instead of the absolute one 🌈
  • --relative-base <DIR> β€” print absolute paths unless paths below DIR. absolute by default, but anything underneath DIR gets to be relative. special treatment for that one directory, periodt.
  • -h, --help β€” print help. your girl is explaining herself πŸ’–
  • -V, --version β€” print version. proof she exists and is thriving ✨
  • <files> β€” the file(s) you're throwing at her. plural. FILE.... she can handle a whole stack, she's built different πŸ¦‹

πŸ‘‘ VERSION πŸ‘‘

she's all grown up: v(uutils coreutils) 0.12.0 🌟


⚠️ quick vibe check: -P/--physical and -E/--canonicalize are the defaults, so if you don't pass anything you're already running physical resolution with everything-but-the-last-component required to exist. and -s/--strip is the odd one out β€” no symlink resolving at all, just . and .. being tidied away.

okay that's the whole page bestie, go resolve some paths and slay πŸ’…πŸŒΈ

v(uutils coreutils) 0.12.0 Β· 2026-09-17 Β· that's the source, the version and the date β€” mwah, bye πŸŽ€πŸ’œ

πŸ“¦ where this page comes from