Skip to content

Instantly share code, notes, and snippets.

@tohuw
Last active August 29, 2015 14:15
Show Gist options
  • Save tohuw/b3775aa2e65987e04dab to your computer and use it in GitHub Desktop.
Save tohuw/b3775aa2e65987e04dab to your computer and use it in GitHub Desktop.
Fun with 'Find'
#! /bin/bash
## Fun with 'Find':
## A small collection of one-liners demonstrating the power of find.
# Find all files larger than a given size
find /foo/bar -type f -size +1024k
# Recursively rename files matching a pattern
find -name '*.JPG' -exec rename .JPG .jpg {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment