SRC(1)
π NAME π
okay so welcome to SRC(1), General Commands Manual bestie β this page is all about src β find source code for executable. itβs giving detective energy for your binaries ππ
β¨ SYNOPSIS β¨
src [ -n ] [ -s symbol ] file ...
π¦ DESCRIPTION π¦
src examines the named file ... files to find the corresponding source code, and then that source gets sent to the editor using B (see sam(1)). no cap, thatβs the whole mission π«Ά
- if
fileis anrc(1)script, the source is the file itself. iconic, self-referential, we love her π - if
fileis an executable, the source is defined to be the single file containing the definition ofmain, andsrcwill point the editor at the line that begins the definition. main character behavior fr fr π srcusesdb(1)to extract the symbol table information that identifies the source. thatβs the secret sauce π§
src looks for each file in the current directory, in /bin, and in the subdirectories of /bin, in that order. literally that order, bestie β current dir first, then /bin, then /binβs subdirectories π
options tea β
-nβ causessrcto print the file name but not send it to the editor. print-only mode, no editor pop-up, we respect the boundary π-ssymbol β identifies a symbol other thanmainto locate. you want a different symbol? say less, pass it here π―
π EXAMPLES π
find the source to the main routine in /bin/ed:
src ed
find the source for strcmp:
src -s strcmp rc
π SOURCE π
the source path is:
/bin/src
πΈ SEE ALSO πΈ
sign-off cuteness: this is SRC(1) from the General Commands Manual, and the SOURCE is /bin/src. thereβs no extra date/version line in the original footer, so Iβm not inventing one β periodt πβ¨
π¦ where this page comes from
- alpine 3.24: plan9port-doc 0_git20260208-r0 Β· LPL-1.02
- arch rolling: plan9port 20261021-2 Β· custom
- nixos 26.05: plan9port 0-unstable-2025-11-10
- nixos 26.05: plan9port-wayland 0-unstable-2025-11-26
- nixpkgs unstable: plan9port 0-unstable-2025-11-10
- nixpkgs unstable: plan9port-wayland 0-unstable-2025-11-26
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms