Skip to content

Instantly share code, notes, and snippets.

@kovacs
Created February 26, 2015 20:50
Show Gist options
  • Save kovacs/1dbc7cafd405253110b4 to your computer and use it in GitHub Desktop.
Save kovacs/1dbc7cafd405253110b4 to your computer and use it in GitHub Desktop.
Bulk rename/move files
Simple reminder for myself next time I've downloaded a bunch of files with the wrong, or no extension...
Given the following wav files in a dir:
50-13-0
50-13-1
50-13-2
50-13-3
50-13-4
50-13-5
50-13-6
Running: ls | grep "50-13" | xargs -I '{}' mv '{}' '{}'.wav
Results in:
50-13-0.wav
50-13-1.wav
50-13-2.wav
50-13-3.wav
50-13-4.wav
50-13-5.wav
50-13-6.wav
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment