Is there a convenient way to rename a file (or dir) without redundantly repeating the path or directory-changing to it?
For example …
mv -some_flag db/migrations/abc_201911201243.php abc_20191101090000.php
… to rename the file without moving it out of that directory.
I looked into the man pages for mv
, rename
and rsync
but didn't find anything, so I'm wondering if there is by chance a non-obvious trick to do this.
-some_flag
since in my question it was assumed to be part of the solution; but for this solution, it isn't. – WoodrowShigeru Nov 20 '19 at 15:14