Introduction

Part 2

Files and directories without fear

A file manager shows a tree. A terminal lets you describe changes to that tree. The safest rhythm is simple: inspect change inspect again.

Think in a tree, not in windows

A project is just a tree of directories and files. The terminal does not remove that visual model; it gives you shorter verbs for changing it. md creates a directory, mf creates a file, and dir lets you inspect the tree at a chosen depth.

The useful habit is to name paths explicitly. project/notes/ideas.txt tells you both what the file is and where it belongs. Clear paths make commands readable months later and make scripts portable.

Build a tiny project from an empty directory

Create a project with separate places for assets, configuration and notes. Nothing here is special to lil-terminal; this is the same organizational thinking you use in any filesystem.

After creating the structure, ask dir to show it. The output is your confirmation that the commands did what you intended.

cd lil-playground
md project | md project/assets | md project/config | md project/notes
mf project/notes/ideas.txt | mf project/config/app.ini
dir 3 project -G -a

Inspect before you change

stat answers questions about one path: what it is, how large it is, timestamps and other useful metadata. dir answers a different question: what is around this path. Use the two together before an operation whose destination matters.

This is a stronger habit than memorizing a safety flag. The terminal cannot know that two similarly named directories mean different things to you; inspection is how you add that context.

stat project/notes/ideas.txt
dir 2 project -G -a

Copy, move and rename are three different intentions

copy keeps the source and creates another copy. mov changes the location. ren changes the name, or lets you explicitly name the source and its new name. Keeping these intentions separate makes command lines easy to review.

Run each operation on the practice files and inspect the tree afterward. A command is easier to trust when you can predict the tree before pressing Enter.

copy project/notes/ideas.txt project/notes/ideas.copy.txt
ren project/notes/ideas.copy.txt ideas-archive.txt
md project/archive
mov project/notes/ideas-archive.txt project/archive

Search the project instead of opening folders one by one

find can search names, files, directories and text under a chosen path. This is one of the moments where the terminal starts to feel dramatically faster than manual browsing: the query describes what matters, not the route through folders.

Start with narrow searches. Search filenames in project, then text inside the same small tree. Later the same pattern scales to a much larger codebase.

find ideas -f -p project
find app -f -e ini -p project/config
find archive -F -p project

Deletion deserves its own ritual

Deletion is the operation where speed is least important. Build a disposable project/tmp, inspect it, and only then remove it recursively. Never copy a destructive example into a real project without replacing the path consciously.

The useful rule is: the shorter the command, the more carefully you should verify its target. A terminal makes destructive actions fast, so your process has to make the target obvious.

md project/tmp | mf project/tmp/throw-away.txt
dir 2 project/tmp -G -a
del project/tmp -r

A project skeleton is already automation

If you repeatedly start projects with the same directories, stop rebuilding the structure by hand. Save the verified sequence as a .lil file. The script becomes a portable project skeleton.

Later you can extend it with configuration, archives, uploads, checks and installation commands. The important part is that the script grows from actions you already tested rather than from a giant opaque recipe.

Keep this as a script

Save this as project-skeleton.lil. It creates a small predictable structure. When you start another project, copy the script, change the names that are genuinely project-specific, and keep the rest.

#lil
@install md mf dir stat copy ren mov find
cd lil-playground
md project
md project/assets
md project/config
md project/notes
mf project/notes/ideas.txt
dir 3 project -G -a