cd

Move to another folder and immediately list its contents without descending into subfolders.

FilesVersion 1.2.6Stable
lil-terminal

Overview

cd is the quickest way to move between folders. For example, cd data opens the data directory and displays its files, cd .. moves up one level, and cd - returns to your previous folder. Ordinary navigation does not need a complete directory tree.

Go straight to the right directory

If you only need to reach the next file, keep things light with cd. Add -s to see sizes or -d to see modification dates. For nested folders, filename masks or sorting, use the separate dir command; you do not need that extra module just to change folders.

Syntax

lil-terminal
cd [path|-] [-s|-S] [-d|-D]

Reference

cd | cd .

show a flat list for the current directory

cd <path>

move to a relative, absolute, "~" or "\" path

cd ..

move one level up

cd -

switch to the previous directory

cd ~

move to the directory selected through @pwd

cd \

move to the directory containing the lil core

-s

show file sizes

-S

show file and directory sizes

-d

show modification dates

-D

show modification dates and times

Columns

-s shows file sizes and leaves directories as a dash. -S also measures directory contents recursively. Directory measurement is deliberately bounded; an unreadable or unfinished directory is shown as ?. The order of size and date flags controls the column order: cd -s -d puts size before date, while cd -d -s puts date before size. Metadata columns use a wider gap, while the final filename receives the remaining width.

Notes

Relative paths start from the current lil-terminal directory. The "~" prefix starts from the directory selected with @pwd -s or @pwd set, while "\" starts from the directory containing the lil core; therefore cd ~tmp and cd \tmp may point to different folders. Quoted paths may contain spaces. A missing path returns Directory not found, a file path returns Not a directory, and cd - reports when no previous directory exists.

Interactive sandbox preview

Run the prepared examples directly on the page. Their results are prebuilt and shown in the browser; no terminal command is executed on the server.

Move to a relative, absolute, "~" or "\" path

Install and manage

Install the current compatible version. Choose Base for the complete feature set or Minimum for the reduced package; use upgrade to update a module that is already installed.

Base and Minimum are two packages of the same current module release, not separate command versions.

Built into the core

This command is part of the selected lil-terminal core and is not installed as an ordinary extension.

Examples

Examples are copyable command lines, not actions executed by this website. Review paths, permissions and destructive flags before running them on a real project.

Move to a relative, absolute, "~" or "\" path
cd \sandbox | cd data | cd .. | cd -
config/
data/
db/
images/
logs/
public/
scripts/
tmp/
workspace/

sample.csv
sample.txt
users.json

config/
data/
db/
images/
logs/
public/
scripts/
tmp/
workspace/

sample.csv
sample.txt
users.json
Show file sizes
cd \sandbox -s -d
      -    2026-08-04    archives
      -    2026-08-09    config
  127  B   2026-08-09    feed.xml
  718  B   2026-08-10    README.txt
Show modification dates
cd \sandbox -d -s
2026-08-04          -    archives
2026-08-09          -    config
2026-08-09      127  B   feed.xml
2026-08-10      718  B   README.txt
Show file and directory sizes
cd \sandbox -S -D
6.5 KB    2026-08-09 03:58:34    certs
1.0 KB    2026-08-09 12:22:13    config
127  B     2026-08-09 01:00:07    feed.xml
718  B     2026-08-10 15:47:59    README.txt
Enter a relative directory
cd sandbox
config/
data/
images/
src/
.env.example
app.ini
app.json
feed.xml
Open a path with spaces
cd "sandbox/sample project"
assets/
index.html
README.md
Move to the parent directory
cd ..
sandbox/
website_e36e9fed/
Return to the previous directory
cd -
sandbox
Open the saved ~ base
cd ~
sandbox
Open the installation root
cd \
sandbox
Move to a relative, absolute, "~" or "\" path
cd \sandbox\missing
Directory not found
Show a flat list for the current directory
cd .
README.txt
config/
data/
db/
images/
logs/
public/
scripts/
src/
tmp/
workspace/
Show file sizes
cd \sandbox -s
       -    config
   127 B    feed.xml
   718 B    README.txt
       -    tmp
Show file and directory sizes
cd \sandbox -S
  1.0 KB    config
   127 B    feed.xml
   718 B    README.txt
   160 B    tmp
Show modification dates
cd \sandbox -d
2026-08-11    config
2026-08-11    feed.xml
2026-08-11    README.txt
2026-08-11    tmp
Show modification dates and times
cd \sandbox -D
2026-08-11 18:40:00    config
2026-08-11 18:40:00    feed.xml
2026-08-11 18:40:00    README.txt
2026-08-11 18:40:00    tmp

File used in this example: sandbox/README.txt

The example uses a file or directory from the protected /sandbox/ documentation workspace.

lil-terminal documentation sandbox

This directory is part of the server tree: website_e36e9fed/sandbox/.
It is never included in generated lil-terminal downloads and direct HTTP access is blocked.
The documentation renderer reads only explicitly allow-listed files from here and
uses them to show real, reproducible command examples.

The fixtures are intentionally small and contain no secrets. They cover PHP, HTML,
CSS, JavaScript, JSON, INI, SQL, Python, shell, XML/SVG, CSV, plain text, logs,
images, .lil workflows, archives and temporary work paths.

During module review, examples may be refined together with the command. Keep paths
stable whenever possible because public documentation links refer to them.

Related documentation

Current release

v1.2.62026-10-31

Production refinement

Current stable release of cd. Move to another folder and immediately list its contents without descending into subfolders.