Edit file and directory names in $EDITOR
. Inspired by itchyny/mmv.
mmv behaves like other commandline tools: it accepts a list of arguments, including patterns like wildcards. See man mmv
for options.
In the above example, mmv is provided the verbose
argument so that it will list what renames it conducts and three wildcard arguments that are duplicates of each other:
test
mmv is capable of removing duplicate arguments even when the input strings don't match, for example test0.txt
and ~/test_dir/test0.txt
. In the editing buffer, we see only one instance of each unique file, though three were given for each. When cycles between renames are detected, for example renaming test0.txt
to test1.txt
even though that destination already exists, mmv will remove the cycles by conducting intermediate renames on only those files which are detected as cycles, i.e. it avoids renaming everything when a cycle is detected. These intermediate rename operations are visible in the verbose output. cat is used here to display that the contents of the files remains the same.
make
, then sudo make install
In all:
$ git clone https://github.com/mcauley-penney/mmv-c.git
$ cd mmv-c
$ make
$ sudo make install
$ cd ..
$ sudo rm -r mmv-c
Glenn Fowler, Landon Curt Noll, and Kiem-Phong Vo
Mike Parker, David MacKenzie, Jim Meyering, and all of the contributors to coreutils/mv