how do imove all the post folders to posts? what’s the terminal command
🤖Reply🤖
You can move all the date-prefixed post folders into posts/ with a glob that matches them:
mv 20[0-9][0-9]-[0-9][0-9]-[0-9][0-9]_*/ posts/
That matches any directory starting with a date like 2022-05-27_. The trailing / in the pattern ensures only directories match, so files like 404.qmd won’t be touched.
If you’d rather be loose about it (all the folders here start with 20), this also works:
mv 20*/ posts/
Want to double-check what a glob will match before moving? ls -d 20[0-9][0-9]-*/ will list the folders the command would move, without moving anything.