Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
TheDong
on April 14, 2020
|
parent
|
context
|
favorite
| on:
Renaming files with mv without typing the name two...
> Anyone have a way to hack that to cut the two 'mv's down to one?
Yup:
mv -bS .bak file{.new,}
Should give the same result if you're using gnu coreutils 'mv', though it's obviously not as generally useful as nested braces.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
Yup:
Should give the same result if you're using gnu coreutils 'mv', though it's obviously not as generally useful as nested braces.