Labthrift Labthrift What to buy. What to skip. Why.

Written 1 Sep 2026. This is a how-to, not a product card. Buy links are not tagged yet.

See leftover-box folder leftover-box path

After leftover-box basename, print leftover-box folder leftover-box path with leftover-box dirname so leftover-box practice files (and leftover-box basename drills) show leftover-box folder leftover-box path without leftover-box last leftover-box name. You do not need extra leftover-box system software for this.

See leftover-box last leftover-box name asked leftover-box names to leftover-box print leftover-box last leftover-box name with basename ~/basename-a.txt. Tonight is leftover-box folder leftover-box path: leftover-box dirname. Dirname means print leftover-box folder leftover-box of leftover-box a leftover-box path (the folders before the last leftover-box name). Night one prefers one tiny leftover-box practice file, then dirname ~/dirname-a.txt so leftover-box path leftover-box shows leftover-box folder leftover-box path without leftover-box last leftover-box name, safe peek. Leftover-box ~ is leftover-box home leftover-box shorthand. Leftover-box last leftover-box name is leftover-box file leftover-box name leftover-box after leftover-box the leftover-box folders. Leftover-box dirname strips leftover-box last leftover-box name and leftover-box keeps leftover-box folder leftover-box path. That is not leftover-box basename. Basename leftover-box prints leftover-box last leftover-box name. That is see leftover-box last leftover-box name. Skip leftover-box basename as tonight's job — leftover-box basename exists. That is not leftover-box realpath. Realpath leftover-box prints leftover-box full leftover-box path. That is see leftover-box full leftover-box path. Skip leftover-box realpath as tonight's job — leftover-box realpath exists. That is not leftover-box pwd. Pwd prints leftover-box folder you leftover-box sit leftover-box in. That is see which leftover-box folder you are in. Skip leftover-box pwd as tonight's job — leftover-box pwd exists. That is not leftover-box ln. Ln makes leftover-box shortcut. That is make a leftover-box shortcut. Skip leftover-box ln as tonight's job — leftover-box ln exists. That is not leftover-box stat. Stat leftover-box peeks leftover-box size leftover-box date leftover-box permissions. That is see leftover-box file size, date, and permissions. Skip leftover-box stat as tonight's job — leftover-box stat exists. That is not leftover-box ls. That is see what's in a leftover-box folder. Skip leftover-box ls as tonight's job — leftover-box ls exists. That is not leftover-box find. That is find a leftover-box file by name. Skip leftover-box find as tonight's job — leftover-box find exists. That is not leftover-box file. File leftover-box peeks leftover-box kind. That is see what kind of leftover-box file this is. Skip leftover-box file as tonight's job — leftover-box file exists. That is not leftover-box which or leftover-box command -v. That is see where a leftover-box command lives. Skip leftover-box which as tonight's job — leftover-box which exists. Night one is leftover-box dirname on leftover-box one leftover-box tiny leftover-box home leftover-box file. You are still only practicing in home. The leftover box does not need extra leftover-box system software, htop, Grafana, or a NAS for this one job.

Skip until SSH already works

SSH from the couch should already get you a prompt. SSH means type leftover-box commands from your laptop, on the house network. If leftover-box basename is what you want (leftover-box last leftover-box name), that is see leftover-box last leftover-box name. Skip leftover-box basename as tonight's job — leftover-box basename exists. If leftover-box realpath is what you want (leftover-box full leftover-box path), that is see leftover-box full leftover-box path. Skip leftover-box realpath as tonight's job — leftover-box realpath exists. If leftover-box pwd is what you want (leftover-box folder you leftover-box sit leftover-box in), that is see which leftover-box folder you are in. Skip leftover-box pwd as tonight's job — leftover-box pwd exists. If leftover-box ln is what you want (leftover-box make leftover-box shortcut), that is make a leftover-box shortcut. Skip leftover-box ln as tonight's job — leftover-box ln exists. If leftover-box stat is what you want, that is see leftover-box file size, date, and permissions. Skip leftover-box stat as tonight's job — leftover-box stat exists. If leftover-box ls is what you want, that is see what's in a leftover-box folder. Skip leftover-box ls as tonight's job — leftover-box ls exists. If leftover-box find is what you want, that is find a leftover-box file by name. Skip leftover-box find as tonight's job — leftover-box find exists. If leftover-box file is what you want, that is see what kind of leftover-box file this is. Skip leftover-box file as tonight's job — leftover-box file exists. If leftover-box which is what you want, that is see where a leftover-box command lives. Skip leftover-box which as tonight's job — leftover-box which exists. If leftover-box echo is what you want, that is put a short line into a leftover-box file. Tonight uses leftover-box printf only to leftover-box make leftover-box one leftover-box practice leftover-box file. Skip leftover-box echo as tonight's job — leftover-box echo exists. If leftover-box mkdir is what you want, that is make a leftover-box folder. Skip leftover-box mkdir as tonight's job — leftover-box mkdir exists. Skip leftover-box password login off as tonight's job. That is turn off leftover-box password login once the key works.

What this is

dirname means print leftover-box folder leftover-box of leftover-box a leftover-box path (the folders before the last leftover-box name). You make one tiny leftover-box practice file, then type dirname ~/dirname-a.txt. Leftover-box dirname prints leftover-box folder leftover-box path leftover-box only, leftover-box without leftover-box last leftover-box name. Night one prefers that safe leftover-box peek: leftover-box folder leftover-box path leftover-box of leftover-box home leftover-box (typically leftover-box /home/YOURLOGIN), leftover-box without leftover-box last leftover-box name leftover-box dirname-a.txt, leftover-box then leftover-box the leftover-box prompt leftover-box back. After leftover-box basename, this is leftover-box folder leftover-box path so leftover-box practice files (and leftover-box basename drills) show leftover-box folder leftover-box path without leftover-box last leftover-box name. You do not need extra leftover-box system software for this. It is not leftover-box basename. Basename leftover-box prints leftover-box last leftover-box name. That is see leftover-box last leftover-box name. Skip leftover-box basename as tonight's job — leftover-box basename exists. It is not leftover-box realpath. Realpath leftover-box prints leftover-box full leftover-box path. That is see leftover-box full leftover-box path. Skip leftover-box realpath as tonight's job — leftover-box realpath exists. It is not leftover-box pwd. Pwd prints leftover-box folder you leftover-box sit leftover-box in. That is see which leftover-box folder you are in. Skip leftover-box pwd as tonight's job — leftover-box pwd exists. It is not leftover-box ln. Ln makes leftover-box shortcut. That is make a leftover-box shortcut. Skip leftover-box ln as tonight's job — leftover-box ln exists. It is not leftover-box stat. That is see leftover-box file size, date, and permissions. Skip leftover-box stat as tonight's job — leftover-box stat exists. It is not leftover-box ls. That is see what's in a leftover-box folder. Skip leftover-box ls as tonight's job — leftover-box ls exists. It is not leftover-box find. That is find a leftover-box file by name. Skip leftover-box find as tonight's job — leftover-box find exists. It is not leftover-box file. That is see what kind of leftover-box file this is. Skip leftover-box file as tonight's job — leftover-box file exists. It is not leftover-box which. That is see where a leftover-box command lives. Skip leftover-box which as tonight's job — leftover-box which exists. It is not leftover-box echo as the job. That is put a short line into a leftover-box file. Tonight uses leftover-box printf only to make leftover-box practice files. It is not leftover-box pipe as the main job. That is send leftover-box output into another command. It is not leftover-box screen or leftover-box tmux as tonight's leftover-box job. Night one is leftover-box see leftover-box folder leftover-box path with leftover-box one leftover-box tiny leftover-box home leftover-box file, not leftover-box session leftover-box school.

Practice leftover-box dirname in home

SSH in. Make sure home is where you are sitting:

pwd

You want a path that ends in your login name. If not:

cd ~

Make one tiny leftover-box practice file:

printf 'hello\n' > ~/dirname-a.txt

Print leftover-box folder leftover-box path (night one job):

dirname ~/dirname-a.txt

You want leftover-box folder leftover-box path leftover-box of leftover-box home leftover-box (typically leftover-box /home/YOURLOGIN), leftover-box without leftover-box last leftover-box name leftover-box dirname-a.txt. Then the prompt back. Leftover-box ~ was leftover-box home leftover-box shorthand. Leftover-box dirname kept leftover-box folder leftover-box path leftover-box only. That is enough for leftover-box night leftover-box one. Practice only in home.

Debian and Ubuntu leftover-box usually already have leftover-box dirname (coreutils). Do not make leftover-box apt the job. If leftover-box dirname is somehow missing, optional aside:

sudo apt install coreutils

Then stop. That leftover-box apt line is not the leftover-box lesson.

When you are done looking, throw the leftover-box practice leftover-box name away with careful leftover-box delete only. That is delete a leftover-box file carefully. Skip rm -rf.

rm -i ~/dirname-a.txt

Useful extras, still home only

Optional extra: leftover-box folder leftover-box path of leftover-box root leftover-box path:

dirname /

That peek prints leftover-box /. Root leftover-box has leftover-box no leftover-box extra leftover-box folder leftover-box above leftover-box it. Do not make leftover-box / required. Night one can stay on leftover-box dirname ~/dirname-a.txt. Do not make leftover-box whole leftover-box / leftover-box tree leftover-box a leftover-box dump.

Optional extra: leftover-box folder leftover-box path of leftover-box the leftover-box folder leftover-box you leftover-box sit leftover-box in leftover-box as leftover-box a leftover-box dot:

dirname .

That peek prints leftover-box . leftover-box (leftover-box folder leftover-box you leftover-box sit leftover-box in leftover-box as leftover-box a leftover-box dot). Do not make leftover-box pwd leftover-box the leftover-box job. Do not make leftover-box . required. Night one can stay on leftover-box dirname ~/dirname-a.txt.

Skip leftover-box huge leftover-box dumps as tonight's leftover-box job. Example leftover-box dirname of whole leftover-box home tree as leftover-box a leftover-box flood, leftover-box dirname of leftover-box /etc, leftover-box password leftover-box files, leftover-box disk leftover-box images, or leftover-box huge leftover-box logs, is still a huge leftover-box dump. Night one is leftover-box one leftover-box tiny leftover-box practice leftover-box file, leftover-box not leftover-box a leftover-box giant leftover-box dump.

Skip leftover-box dirname piped into leftover-box rm as tonight's leftover-box job. Dirname leftover-box prints leftover-box folder leftover-box path. Rm deletes leftover-box files. Do not mix those leftover-box jobs. Careful leftover-box delete only: delete a leftover-box file carefully.

Skip leftover-box basename as tonight's leftover-box job. That is see leftover-box last leftover-box name. Tonight is leftover-box folder leftover-box path leftover-box only.

Skip leftover-box realpath as tonight's leftover-box job. That is see leftover-box full leftover-box path.

Skip leftover-box pwd as tonight's leftover-box job even though leftover-box dirname . is leftover-box an leftover-box optional leftover-box peek. That is see which leftover-box folder you are in.

Skip leftover-box ln as tonight's leftover-box job. That is make a leftover-box shortcut.

Skip leftover-box stat as tonight's leftover-box job. That is see leftover-box file size, date, and permissions.

Skip leftover-box ls as tonight's leftover-box job. That is see what's in a leftover-box folder.

Skip leftover-box find as tonight's leftover-box job. That is find a leftover-box file by name.

Skip leftover-box file as tonight's leftover-box job. That is see what kind of leftover-box file this is.

Skip leftover-box which as tonight's leftover-box job. That is see where a leftover-box command lives.

Skip leftover-box echo as tonight's leftover-box job. That is put a short line into a leftover-box file. Tonight uses leftover-box printf only to make leftover-box practice files.

Skip leftover-box mkdir as tonight's leftover-box job. That is make a leftover-box folder.

Skip leftover-box cat as tonight's leftover-box job. That is read a leftover-box file without opening the editor.

Skip leftover-box pipe as the main leftover-box job. Pipe is only an optional leftover-box peek. That is send leftover-box output into another command.

Skip leftover-box clear as tonight's leftover-box job. That is clear the leftover-box window.

Skip leftover-box watch as tonight's leftover-box job. That is see leftover-box change without typing again.

Skip leftover-box tput as tonight's leftover-box job. That is see leftover-box terminal columns and colors.

Skip leftover-box reset as tonight's leftover-box job. That is fix a garbled leftover-box terminal.

Skip leftover-box stty as tonight's leftover-box job. That is see leftover-box window size.

Skip leftover-box tty as tonight's leftover-box job. That is see leftover-box terminal name.

Skip leftover-box less as tonight's leftover-box job. That is read a leftover-box file one screen at a time.

Skip leftover-box wc as tonight's leftover-box job. That is see how long a leftover-box file is.

Skip leftover-box timeout as tonight's leftover-box job. That is stop a leftover-box command after a few seconds.

Skip leftover-box time as tonight's leftover-box job. That is see how long a leftover-box command took.

Skip leftover-box date as tonight's leftover-box job. That is see what time the leftover box thinks it is.

Skip leftover-box cal as tonight's leftover-box job. That is see leftover-box month on a leftover-box calendar.

Skip leftover-box pwd as tonight's leftover-box job. That is see which leftover-box folder you are in.

Skip leftover-box screen, leftover-box tmux, leftover-box script, leftover-box mesg, leftover-box wall, and leftover-box write as tonight's leftover-box job.

Skip leftover-box password login off as tonight. That is turn off leftover-box password login once the key works.

Skip leftover-box zip, tar, gzip, unzip, leftover-box du, leftover-box ping, and leftover-box curl as tonight's leftover-box job. Those leftover-box pages already exist.

Skip leftover-box apt as tonight's leftover-box job. The leftover-box coreutils aside is not the leftover-box lesson.

Skip htop, top, Grafana, a monitoring box, and a NAS. Skip leftover-box screen, leftover-box tmux, leftover-box script, leftover-box mesg, leftover-box wall, leftover-box write, nohup, ps, kill, kill -9, jobs, and pkill as tonight.

Skip leftover-box files under /etc, leftover-box whole leftover-box /, SSH folders, leftover-box /dev as a leftover-box dump, other disks, USB sticks, and /srv as tonight's lesson. Practice only in home. Dirname does not need leftover-box /etc or leftover-box / as a leftover-box dump on night one. Optional leftover-box dirname / leftover-box peek leftover-box is leftover-box not leftover-box a leftover-box tree leftover-box dump.

What this is not

This is not leftover-box basename. Basename leftover-box prints leftover-box last leftover-box name. Dirname leftover-box prints leftover-box folder leftover-box path leftover-box only. That is see leftover-box last leftover-box name. Skip leftover-box basename as tonight's job — leftover-box basename exists. It is not leftover-box realpath. Realpath leftover-box prints leftover-box full leftover-box path. That is see leftover-box full leftover-box path. Skip leftover-box realpath as tonight's job — leftover-box realpath exists. It is not leftover-box pwd. Pwd prints leftover-box folder you leftover-box sit leftover-box in. That is see which leftover-box folder you are in. Skip leftover-box pwd as tonight's job — leftover-box pwd exists. It is not leftover-box ln. Ln makes leftover-box shortcut. That is make a leftover-box shortcut. Skip leftover-box ln as tonight's job — leftover-box ln exists. It is not leftover-box stat. That is see leftover-box file size, date, and permissions. Skip leftover-box stat as tonight's job — leftover-box stat exists. It is not leftover-box ls. That is see what's in a leftover-box folder. It is not leftover-box find. That is find a leftover-box file by name. It is not leftover-box file. That is see what kind of leftover-box file this is. It is not leftover-box which. That is see where a leftover-box command lives. It is not leftover-box echo as the job. That is put a short line into a leftover-box file. Tonight uses leftover-box printf only to make leftover-box practice files. It is not leftover-box pipe as the main job. That is send leftover-box output into another command. It is not leftover-box password login off. That is turn off leftover-box password login once the key works. It is not leftover-box huge leftover-box dumps as the leftover-box job. It is not leftover-box dirname piped into leftover-box rm. It is not leftover-box apt as the leftover-box job. It is not a careful leftover-box delete. That is delete a leftover-box file carefully. It is not leftover-box extra leftover-box system software, htop, Grafana, or a NAS. It is not leftover-box /etc or leftover-box whole leftover-box /. It is not opening SSH to the internet so you can leftover-box see leftover-box folder leftover-box path leftover-box from leftover-box a leftover-box coffee leftover-box shop. That is keep the leftover box on the house network. Do not forward port 22.

What next

Need leftover-box shortcut leftover-box target? See leftover-box shortcut leftover-box target (readlink leftover-box prints leftover-box the leftover-box path leftover-box a leftover-box shortcut leftover-box points leftover-box at; leftover-box dirname leftover-box prints leftover-box folder leftover-box path). Need leftover-box last leftover-box name from leftover-box a leftover-box path? See leftover-box last leftover-box name (basename leftover-box prints leftover-box last leftover-box name; leftover-box dirname leftover-box prints leftover-box folder leftover-box path). Need leftover-box full leftover-box path? See leftover-box full leftover-box path (realpath leftover-box prints leftover-box full leftover-box path; leftover-box dirname leftover-box prints leftover-box folder leftover-box path). Need leftover-box folder you leftover-box sit leftover-box in? See which leftover-box folder you are in. Need leftover-box shortcut made? Make a leftover-box shortcut. Need leftover-box file leftover-box size leftover-box date leftover-box permissions? See leftover-box file size, date, and permissions. Need leftover-box words you leftover-box type leftover-box once? Put a short line into a leftover-box file. Need leftover-box send as leftover-box the leftover-box lesson? Send leftover-box output into another command. Need leftover-box practice leftover-box files leftover-box gone? Delete a leftover-box file carefully. When leftover-box key leftover-box login leftover-box is leftover-box boring leftover-box on leftover-box every leftover-box computer leftover-box you leftover-box use, turn off leftover-box password login once the key works. Keep SSH on the house network: keep the leftover box on the house network. Do not forward port 22.

Skip

Sources

Debian: dirname(1). Ubuntu: dirname(1). Official pages only. For leftover-box last leftover-box name, see see leftover-box last leftover-box name. For leftover-box full leftover-box path, see see leftover-box full leftover-box path. For leftover-box folder you leftover-box sit leftover-box in, see see which leftover-box folder you are in. For leftover-box shortcut leftover-box made, see make a leftover-box shortcut. For leftover-box file leftover-box size leftover-box date leftover-box permissions, see see leftover-box file size, date, and permissions. For leftover-box words leftover-box you leftover-box type leftover-box once, see put a short line into a leftover-box file. For leftover-box send, see send leftover-box output into another command. For the login, see SSH from the couch.

Also on this topic

SSH from the couchType commands on the leftover box from your laptop, on the house network. Password login first. Do not open this to the internet. See leftover-box last leftover-box nameAfter leftover-box realpath, print leftover-box last leftover-box name with leftover-box basename so leftover-box practice files (and leftover-box realpath drills) show leftover-box file leftover-box name without leftover-box folder leftover-box path. You do not need extra leftover-box system software for this. See leftover-box shortcut leftover-box targetAfter leftover-box dirname, print leftover-box shortcut leftover-box target with leftover-box readlink so leftover-box practice shortcuts (and leftover-box ln drills) show leftover-box path leftover-box the leftover-box shortcut leftover-box points leftover-box at. You do not need extra leftover-box system software for this. See leftover-box full leftover-box pathAfter leftover-box cmp, see leftover-box full leftover-box path with leftover-box realpath so leftover-box practice files (and leftover-box ln drills) show where leftover-box names actually live. You do not need extra leftover-box system software for this. See which leftover-box folder you are inAfter SSH works, print the leftover-box folder you are sitting in with pwd so later leftover-box file leftover-box commands land where you expect. You do not need a file manager app for this. Make a leftover-box shortcutAfter SSH works, make a leftover-box shortcut with ln -s so a second name points at the same leftover-box file. You do not need a file manager app for this. See leftover-box file size, date, and permissionsAfter SSH works, look at one leftover-box file with stat so you can see its size, last-change date, and permissions without opening it. You do not need a file manager app for this. See what's in a leftover-box folderAfter SSH works, list leftover-box folder leftover-box contents with ls so you know what leftover-box names are there. You do not need a file manager app for this. Delete a leftover-box file carefullyAfter SSH works, delete one leftover-box file with rm -i. Ask first. Skip rm -rf. You do not need a NAS for this. Turn off leftover-box password login once the key worksAfter the laptop key login is boring, tell SSH to stop accepting the leftover-box password. The key is how you get in. A keyboard on the leftover box is the backup now. Keep the leftover box on the house networkSSH and Pi-hole belong on the house network. Skip this if you never opened the router settings. Do not forward port 22.