↓ Skip to Main Content
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.

To find out more, including how to control cookies, see here: Cookie Policy
Blackcat Software Multiplatform Software, Hardware, Administration

Main Navigation

  • Home
  • What We Offer
  • Products We Support
  • Contact Us
Blackcat Software Multiplatform Software, Hardware, Administration

Off Canvas Menu

  • Home
  • What We Offer
  • Products We Support
  • Contact Us
Linux

Rename Jpgs in a Directory with a Prefix and Sequential Numbers

Dave Jul 1, 2014 Tagged with bash, fast, JPEG, Linux, prefix, script, sequential number, unix
$ cd pictureDirectory
$ find -name '*.jpg' | gawk 'BEGIN{ a=1 }{ printf "mv %s MY_FILE_PREFIX_%02d.jpg\n", $0, a++ }' | bash 

Adapted from Pero’s post at Stackoverflow.

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook

Like this:

Like Loading…

Related

Post navigation

Previous ← Dynamic Libraries dylib for Office using XCode 5
Next TrailLife required fields →
Copyright © 2026 Blackcat Software | Powered by Responsive Theme
Copyright © 2026 Blackcat Software | Powered by Responsive Theme
%d