mov

Move a file or directory to a new location or path; replacing an existing target is always explicit.

FilesVersion 1.2.2Stable
lil-terminal

Overview

mov follows the familiar source destination model for files and directories: move into an existing directory, assign a new path, or use -f to replace a compatible destination explicitly.

Move files without ambiguity

Decide whether <dst> is a container directory or the exact new path before moving; use -f only for an intentional replacement.

Syntax

lil-terminal
mov <src> <dst> [-f]

Reference

mov <src> <dst>

move a file or directory to <dst>

mov <src> <dst> -f

move over an existing file, link or empty directory

Destination rules

mov sandbox/tmp/a.txt sandbox/archive/ moves a.txt into archive when archive already exists as a directory. mov sandbox/tmp/a.txt sandbox/archive/a.txt gives the final path explicitly. Moving a directory into one of its own descendants is rejected.

Why -f exists

Without -f, an existing final path is an error. With -f, mov sandbox/tmp/new.txt sandbox/archive/current.txt -f deliberately replaces current.txt. Files and links can be replaced; a directory can replace only an empty directory. A non-empty directory must be removed explicitly before moving another tree into its place.

Compatibility

Older lil-terminal releases accepted mov <dst> as a shortcut for moving the current directory. Base keeps that form internally for existing scripts, but it is no longer part of the public reference. New commands and automation should always use explicit SOURCE and DESTINATION arguments.

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 a file or directory to <dst>

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 mov
Minimum package

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

install mov -m
Exact public version

Install exactly this published version.

install mov -v 1.2.2
Check or update

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

upgrade mov
Remove module

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

install mov -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.

Move a file or directory to <dst>
cd \sandbox\tmp | @mf move-me.txt | mov move-me.txt ..\workspace\move-me.txt | cd ..\workspace | pwd
move-me.txt

workspace/
move-me.txt
original.txt
replace.txt
updated.txt

/home/account/public_html/sandbox/workspace
Move a file or directory to <dst>
mov sandbox/tmp/draft.txt sandbox/tmp/final.txt
moved  sandbox/tmp/draft.txt → sandbox/tmp/final.txt
Move over an existing file, link or empty directory
mov sandbox/tmp/new.txt sandbox/tmp/current.txt -f
moved    sandbox/tmp/new.txt → sandbox/tmp/current.txt
replace  existing file explicitly
Move a file or directory to <dst>
mov sandbox/tmp/project sandbox/workspace/
moved  sandbox/tmp/project → sandbox/workspace/project
Move a file or directory to <dst>
mov \sandbox\tmp\new.txt \sandbox\tmp\current.txt
Destination already exists

File used in this example: sandbox/workspace/original.txt

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

alpha
beta
gamma

Related documentation

Current public release

v1.2.22026-08-13

Clearer destination wording

The primary reference now describes the explicit <dst> destination directly.