Skip to content

Instantly share code, notes, and snippets.

@VladislavTitov
Created March 10, 2021 18:35
Show Gist options
  • Save VladislavTitov/d931e9b196814e616cab4f1aebd3931c to your computer and use it in GitHub Desktop.
Save VladislavTitov/d931e9b196814e616cab4f1aebd3931c to your computer and use it in GitHub Desktop.
#!/usr/bin/bash
sourceName=$1
destName=$2
find -name "$sourceName" | while read foundName
do
destDir=`dirname "$foundName"`
mv "$foundName" "$destDir/$destName"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment