mod

Change UNIX permissions and timestamps for a file or directory without calling system chmod or touch.

FilesVersion 1.1.3Stable
lil-terminal

Overview

mod changes UNIX permissions in compact or mode form and adjusts timestamps with separate access and modification selectors.

Change only the metadata you need

Change only the metadata you mean to change: permissions, date or time, access time and modification time can be selected deliberately.

Syntax

lil-terminal
mod <path> [-0755|-m 0755] [-YYYYMMDD] [-HHMMSS] [-o|-s]

Reference

mod <path> -0755

set octal permissions directly

mod <path> -m 0755

set permissions in UNIX mode format through the mode option

mod <path> -20251225

set the date

mod <path> -121008

set the time in HHMMSS format

mod <path> -20251225 -121008

set the date and time

mod <path> ... -o

change only the access time

mod <path> ... -s

change only the modification time

Permissions

The short -0755 form and -m 0755 describe the same UNIX permission value. They are kept as two explicit syntaxes so users can choose compact terminal input or a conventional mode option.

Timestamps

Date and time can be supplied together or separately. Without -o or -s, timestamp changes apply to both access and modification time. -o restricts the change to access time; -s restricts it to modification time. ctime is controlled by the filesystem and cannot be set directly.

Result

When stat is installed, mod returns the updated metadata through stat; otherwise a successful change returns the normal success marker.

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.

Set octal permissions directly

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.

Base package

Install the complete package with local command reference and every published mode.

install mod
Minimum package

Install the reduced package. Local reference is omitted; help <cmd> -i opens the current server reference.

install mod -m
Exact public version

Install exactly this published version.

install mod -v 1.1.3
Check or update

Ask upgrade to check compatibility and replace the installed block only when needed.

upgrade mod
Remove module

Remove the extension block while leaving the core and unrelated modules intact.

install mod -u

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.

Set octal permissions directly
cd \sandbox\tmp | @mf permissions.txt | mod permissions.txt -0600 | @stat permissions.txt
permissions.txt

0600

permissions.txt
0600
Set permissions in UNIX mode format through the mode option
mod sandbox/tmp/example.txt -m 0600
Permissions  0600  -rw-------
Set the date
mod sandbox/tmp/example.txt -20261225
Modified  2026-12-25
Set the time in HHMMSS format
mod sandbox/tmp/example.txt -121008
Modified  12:10:08
Accessed  12:10:08
Set the date and time
mod sandbox/tmp/example.txt -20261225 -121008
Modified  2026-12-25 12:10:08
Change only the modification time
mod sandbox/tmp/example.txt -121008 -s
Modified  12:10:08
Accessed  unchanged
Set octal permissions directly
mod \sandbox\tmp\missing.txt -0644
Path not found

File used in this example: sandbox/tmp/README.txt

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

lil-terminal sandbox temporary workspace

Commands in the public documentation use this directory for disposable copies,
archives, uploads and files created during examples. Review destructive commands
before running them and restore the sandbox from the release package when needed.

Related documentation

Current public release

v1.1.32026-08-10

First stable release

Current stable release of mod. Change UNIX permissions and timestamps for a file or directory without calling system chmod or touch.