Skip to content

Instantly share code, notes, and snippets.

@jasonehines
Created April 3, 2016 17:57
Show Gist options
  • Save jasonehines/db46f82740b92a01bf805a6aba43dab4 to your computer and use it in GitHub Desktop.
Save jasonehines/db46f82740b92a01bf805a6aba43dab4 to your computer and use it in GitHub Desktop.
Find and rename file
# find file in current directory and rename some_file_name to end in .old
find . -iname *some_file_name* -exec mv {} {}.old \;
# find file in directory starting with rc and rename to end in .old
find .rc* -iname *some_file_name* -exec mv {} {}.old \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment