tree → one archiveSimple uncompressed project snapshotArchives, transfer and media: move a project without losing the method
Files become truly useful when you can package, verify, transfer and transform them. The terminal lets these operations become one reviewable chain instead of a sequence of unrelated windows and dialogs.
An archive is more than a smaller file
A good archive is a checkpoint: a named, inspectable snapshot you can keep before a risky operation, send to another person or move to another host. TAR and ZIP both package trees, but the value is the same — many paths become one object with a clear boundary.
Create archives inside backups, then inspect the resulting file with
install md mf dir stat tar zip upload img exif attr copycd lil-playgroundmd archive-demomf archive-demo/README.txtmf archive-demo/config.inimd backupstar archive-demo backups/archive-demo.tar -fstat backups/archive-demo.tarTAR and ZIP solve related but different transport problems
TAR is a straightforward archive container and in lil-terminal is intentionally uncompressed. ZIP combines the archive with compression and is widely convenient for interchange. GZIP in the
Do not choose by habit alone. TAR is excellent when you want a simple faithful bundle; ZIP is convenient when compression and broad desktop interoperability matter.
tree → compressed archiveCompact exchange with common desktop toolsone file → compressed streamCompression for a single filetar backups/archive-demo.tar -ltar backups/archive-demo.tar -tzip archive-demo backups/archive-demo.zip -f -6zip backups/archive-demo.zip -tList and test before you extract
Both archive modules can show contents and test integrity without writing extracted files. This is an important terminal habit: receiving an archive does not mean immediately unpacking it into the current project.
For practice, extract into restore-test rather than on top of the source. Then inspect the restored tree. A separate destination turns restoration into a reversible comparison instead of a leap of faith.
md restore-testtar backups/archive-demo.tar restore-testdir 2 restore-test -G -aUpload and download are a boundary, not a different universe
This is useful on shared hosting because the workflow stays continuous: receive a file, inspect it, transform it, archive it and send the result back without switching to a separate control-panel file manager.
md mediaupload mediadownload backups/archive-demo.zip -n archive-demo-backup.zipdownload archive-demoInspect an image before changing pixels
Upload a disposable JPEG as media/photo.jpg.
Not every image has EXIF data, and EXIF is not the image itself. Treat metadata as optional context. The dependable first question is still simple: what file is this, how large is it, and what dimensions does it actually have?
img media/photo.jpgexif media/photo.jpg -iattr media/photo.jpg dimensionsBuild the batch workflow on a copy first
A realistic media routine is often: inspect originals → copy to a working directory → resize → convert → inspect the result. The example creates a WebP version bounded to 1600x1600 at quality 82, then shows the directory batch form.
The exact dimensions and quality are not universal recommendations. They are parameters of your own publishing process. Once you have tested them on representative images, the terminal makes applying the same rule to a hundred files no harder conceptually than applying it to one.
copy media media-workimg media-work/photo.jpg -s 1600x1600 -t webp -q 82 -o media-work/photo.webpimg -f media-work "*.jpg" -s 1600x1600 -t webp -q 82dir 1 media-work -G -aA delivery package can be rebuilt instead of remembered
If every release needs a TAR checkpoint, a ZIP for someone else and a quick integrity test, save those steps. The script below recreates the package and tests both archives every time.
A repeatable package routine prevents “which checkbox did I use last time?” from becoming part of the release process. Your procedure becomes text that can be reviewed and versioned.
Keep this as a script
Save this as package-project.lil. It rebuilds two archive forms with explicit replacement, tests them and leaves a compact listing of the backup directory. It deliberately does not upload or transform images, because interactive selection and media policy belong to the human-controlled part of the workflow.
#lil
@install md dir stat tar zip
cd lil-playground
md backups
tar archive-demo backups/archive-demo.tar -f
tar backups/archive-demo.tar -t
zip archive-demo backups/archive-demo.zip -f -6
zip backups/archive-demo.zip -t
dir 1 backups -G