cd(n)
β¨ cd(n) β the Tcl Built-In Commands glow-up β¨
okay bestie, welcome to cd(n), straight outta the Tcl Built-In Commands manual section π this is the one that moves you around the filesystem, and honestly? it's giving navigator. main character energy fr fr.
πΈ NAME πΈ
cd β change working directory. that's it. that's the whole job. iconic.
π SYNOPSIS π
cd ?dirName?
π DESCRIPTION π
So like, cd changes the current working directory to dirName. and if you don't hand it a dirName at all? it just bops you over to the home directory, which it figures out from the HOME environment variable. and then it returns an empty string, because it's humble like that. no receipts, no drama. π«Ά
β οΈ ok now the important part, no cap: the current working directory is a per-process resource. so when you cd, you're changing the working directory for all interpreters and all threads. every single one. it's a group chat situation β one person moves, everybody moves. π
π EXAMPLES π
Wanna go home to the user fred's home directory? bet. π
cd [file home fred]
Wanna slide into the lib directory that's a sibling of wherever you currently are? sibling behavior, we love to see it. π¦
cd ../lib
π SEE ALSO π
(yes pwd(n) is right there, the little "where am i" bestie to this "take me there" bestie, a duo π₯Ή)
β KEYWORDS β
working directory
and that's the page!! source + version check: this is from Tcl, dated to the cd(n) manual page, and it's filed under Tcl at the bottom like a little signature. mwah. go forth and navigate, you absolute legend π
β¨
π¦ where this page comes from
- alpine 3.23: tcl9-doc 9.0.3-r0 Β· TCL
- alpine 3.24: tcl9-doc 9.0.3-r2 Β· TCL
- fedora 43: tcl-doc 1:9.0.2-1.fc43 Β· TCL AND GPL-3.0-or-later WITH Bison-exception-2.2 AND BSD-3-Clause
- fedora 44: tcl-doc 1:9.0.2-1.fc44 Β· TCL AND GPL-3.0-or-later WITH Bison-exception-2.2 AND BSD-3-Clause
- nixos 26.05: tcl 9.0.3
- nixpkgs unstable: tcl 9.1.0
- Copyright (c) 1993 The Regents of the University of California
- Copyright (c) 1994-1996 Sun Microsystems, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms