Manual Page Search Parameters

BMV(1) General Commands Manual BMV(1)

bmvbatch move

bmv [-0cdflmnor] list1 [list2]

The bmv utility is a program which takes two lists of names delimited by lines and moves each name from the first list to it's corresponding name in the second list. As it is moved, each destination is printed to the standard output.

The options are as follows:

Use nul to delimit names instead of newline. (This also changes the output delimiter to nul.)
Copy files using cp(1) instead of using rename(2).
Create parent directories of destination files if they are missing.
Only print a warning and otherwise ignore errors with file moving or directory creation.
Use link(2) instead of rename(2).
Use rename(2). This is the default.
The null action; do nothing instead of rename(2).
Allow overwriting of files. (-f would also allow this, but would raise errors.)
Allow removal of files by specifying zero-length destination names.
Shows source and destination names, but in a less useful format than the default.

The bmv utility exits 0 on success, and >0 if an error occurs.

Prefix files in the current directory with 'prefix-'.

$ ls > /tmp/a && sed s/^/prefix-/ < /tmp/a | bmv /tmp/a

Remove files with 'bad' contained within their name and replace

$ mkfifo /tmp/x && tee /tmp/x | sed -e /bad/d -e s/tipo/typo/g | bmv -r /tmp/x

pmv(1), cp(1)

Jacob R. Edwards <jacob@jacobedwards.org>

April 13, 2023 jacob