I recently learned to use a for loop on the command line to organize hundreds of files in a few seconds.
“I’ll get off Facebook now!”, he said
and though he really tried
Those Russian bots still hacked his shit
…and Timmy fucking died.
A local Italian place has a hot turkey sub with Swiss & banana peppers that comes with a side of fries. It has fresh tomatoes & lettuce and is soaked in extra virgin olive oil. It’s so fuckin’ good.
Let’s say, for example, you have a directory of files named x01-001; x01-002; x02-001; x02-002; x03-001… and so on.
I want to create subdirectories for each ‘x’ iteration and move each set to the corresponding subdirectory. My loop would look like this:
for i in {1…3}; do mkdir Data_x0$i && mv x0$i* Data_x0$i; done
I’ve also been using it if I need to rename large batches of files quickly.