One minute
Bulk find and copy in Bash
I needed to move a bunch of files from an old blog to the new one for conversion. Here’s how:
find . -name \*.asciidoc -exec cp {} /home/sionwilliams_com/site/content/post \;
From the current directory it searched for files ending .asciidoc
and moved them to the new location.
Once in the new location I was able to change the extension of the files with:
for f in *.asciidoc; do mv -- "$f" "${f%.asciidoc}.md"; done
Read other posts
comments powered by Disqus