I would like to be able to do this
mv /long/path/to/file/old.txt /long/path/to/file/new.txt
without typing the directory twice. I imagine something like
rename /long/path/to/file/old.txt new.txt
Is this possible?
I would like to be able to do this
mv /long/path/to/file/old.txt /long/path/to/file/new.txt
without typing the directory twice. I imagine something like
rename /long/path/to/file/old.txt new.txt
Is this possible?
You can do it with brace expansion:
mv /long/path/to/file/{old,new}.txt