Bash - create subfolder in each folder

I recently had to add a subfolder to each folder inside a directory in a directory that had more than 100 folders it was a bit tedious to copy paste the folder inside each one of them.Thankfully this can easily done with a bash command :


cd /opt/myfolder
for f in *; do mkdir "$f/myFolder"; done


No comments:

Post a Comment

OSX show used ports or listening applications with their PID

On OSX you can display applications listening on a given port using the lsof the commands described below will show listening application...