Skip to content

Instantly share code, notes, and snippets.

@abatilo
Created January 22, 2017 07:08
Show Gist options
  • Save abatilo/705a2ac08b203a29d8af504a80e98ee5 to your computer and use it in GitHub Desktop.
Save abatilo/705a2ac08b203a29d8af504a80e98ee5 to your computer and use it in GitHub Desktop.
This script will print all java files found recursively from the current directory, and then print the ones that have not been involved in a git commit in some number of months
#!/bin/bash
# This script will print all java files found recursively from the current directory, and then print the ones that
# have not been involved in a git commit in some number of months
#
# Based on:
# https://hackerific.net/2016/04/30/git-file-age-a-script-to-show-when-files-were-last-modified-in-git/
find . -name *.java | xargs -I § git log -1 --pretty="format:%ct %cr %h §;" § | tr ';' '\n' | sort | cut -f 2- | grep "month"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment