Skip to content

Instantly share code, notes, and snippets.

@buranmert
Created August 2, 2016 16:13
Show Gist options
  • Save buranmert/d0f4f80eaa5d8eb332ee0532cc6317eb to your computer and use it in GitHub Desktop.
Save buranmert/d0f4f80eaa5d8eb332ee0532cc6317eb to your computer and use it in GitHub Desktop.
Replace file prefixes in batch
# remove prefix
for file in *; do mv "$file" "$(echo "$file"|cut -c3-)"; done
# add prefix
for file in *; do mv "$file" {{{new_pre}}}"$file"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment