9P(1)

πŸ“¦ version 0_git20260208, in alpine 3.24, arch rolling, nixos 26.05, nixpkgs unstable

πŸ’– NAME πŸ’–

okay bestie, welcome to 9P(1) from the General Commands Manual πŸ’… β€” this page is all about 9p β€” read and write files on a 9P server. πŸ¦‹

✨ SYNOPSIS ✨

9p [ options ] read path
9p [ options ] readfd path

9p [ options ] write [ -l ] path
9p [ options ] writefd path

9p [ options ] stat path

9p [ options ] rdwr path

9p [ options ] ls [ -dl ] path...

🌸 DESCRIPTION 🌸

9p is a trivial 9P client that can access a single file on a 9P server. It can be useful for manual interaction with a 9P server or for accessing simple 9P services from within shell scripts. The common options are:

  • -a addr β€” dial the server at addr
  • -A aname β€” attach to the file system named aname
  • -n β€” mount without authentication

The first argument is a command, one of:

  • read β€” print the contents of path to standard output
  • write β€” write data on standard input to path; the -l option causes write to write one line at a time
  • readfd, writefd β€” like read and write but use openfd(9p) instead of open; this masks errors and is mainly useful for debugging the implementation of openfd
  • stat β€” execute stat (9p) on path and print the result
  • rdwr β€” Open path for reading and writing. Then repeat until end-of-file on standard input: copy a line from the file to standard output, copy a line from standard input to the file. Print errors, but don't give up. Rdwr is useful for interacting with servers like factotum(4).
  • ls β€” Print a directory listing in the format of ls(1). The -d and -l flags have the same meaning as in ls.

9p dials address to connect to the 9P server. If the -a option is not given, 9p requires the path to be of the form service/subpath; it connects to the Unix domain socket service in the name space directory (see intro(4)) and then accesses subpath.

πŸ”₯ EXAMPLE πŸ”₯

To update plumber(4)'s copy of your plumbing rules after editing $HOME/lib/plumbing:

cat $HOME/lib/plumbing | 9p write plumb/rules

To display the contents of the current acme(4) window:

9p read acme/$winid/body

🫢 SOURCE 🫢

/src/cmd/9p.c

πŸ‘‘ SEE ALSO πŸ‘‘

intro(4), intro(9p), 9pclient(3)


and that’s the whole 9P(1) manual page, bestie πŸŽ€ β€” the footer just says 9P(1), no extra date or version line, so that’s the sign-off vibe, periodt πŸ’–