What am i getting wrong here?
I'm trying to move all the .json
and .py
from /home/myname/foo/
to /home/myname/foo/
.
I've tried, while in directory myname
,
mv ./foo/{*.json, *.py} ./bar/
as well ass
mv ./foo/*{.json, .py} ./bar/
,
but to no avail. Would love to learn how to use the expansion correctly of course more than to move the files. Thank you.
Omit the space. Either ./foo/*.{json,py}
or ./foo/*{.json,.py}
should work.
Or, simpler but slightly longer, mv ./foo/*.json ./foo/*.py ./bar
.