LinuxCommandLibrary

vidir

TLDR

Edit filenames in editor

$ vidir
copy
Edit specific files
$ vidir [*.txt]
copy
Edit directory contents
$ vidir [path/to/directory/]
copy
Use specific editor
$ EDITOR=[vim] vidir
copy
Verbose mode
$ vidir -v
copy

SYNOPSIS

vidir [-v] [files|directory]

DESCRIPTION

vidir edits filenames in a text editor. It opens file list for editing.
Each line shows a number and filename. Modify filenames to rename.
Deleting lines removes files. Empty lines are ignored.
Changing numbers reorders (if supported). Some versions support this.
Save and quit applies changes. All renames happen at once.
Useful for batch renaming. Editor features like search/replace available.

PARAMETERS

-v, --verbose

Verbose output.
files
Files to edit.
directory
Directory to edit.

ENVIRONMENT

EDITOR - Editor to use
VISUAL - Visual editor

EXAMPLE

Editor shows:

$ 1 file1.txt
2 file2.txt
3 old_name.doc
copy
Edit to:
$ 1 document1.txt
2 document2.txt
3 new_name.doc
copy

CAVEATS

Part of moreutils package. Careful with deletions. Test on copies first.

HISTORY

vidir is part of moreutils by Joey Hess. It provides intuitive file renaming using familiar editor interfaces.

SEE ALSO

qmv(1), rename(1), mmv(1)

> TERMINAL_GEAR

Curated for the Linux community

Raspberry Pi 5 8GB

Raspberry Pi 5 8GB

$134.50
New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

$54.00
Lenovo Gen 13 ThinkPad X1 Carbon Touchscreen Laptop with Intel Ultra 7 265U Processor, 14" WUXGA 100% sRGB, 32GB DDR5 RAM, 1TB NVMe Performance SSD, FHD+ IR+ RGB Camera, and Windows 11 Pro

Lenovo Gen 13 ThinkPad X1 Carbon Touchscreen Laptop with Intel Ultra 7 265U Processor, 14" WUXGA 100% sRGB, 32GB DDR5 RAM, 1TB NVMe Performance SSD, FHD+ IR+ RGB Camera, and Windows 11 Pro

$1,589.00
Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community

nuphy Air75 V2 Portable 75% Mechanical Keyboard,Wireless Keyboard

nuphy Air75 V2 Portable 75% Mechanical Keyboard,Wireless Keyboard

$129.95
New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

$54.00
BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

$239.99