Skip to content

Instantly share code, notes, and snippets.

@jimschubert
Last active May 8, 2016 14:55
Show Gist options
  • Save jimschubert/3564de3dffc1d2d1f434a5452bf48400 to your computer and use it in GitHub Desktop.
Save jimschubert/3564de3dffc1d2d1f434a5452bf48400 to your computer and use it in GitHub Desktop.
A bash function to display recently changed files recursively below the current directory
#!/bin/env bash
# Display recently changed files recursively below the current directory
# recent [minutes]
# minutes: The number of minutes to display. Default 5.
#
# Credit to find usage goes to
# F. Hauri (http://superuser.com/users/178656/f-hauri)
# see: http://superuser.com/a/621727/60571
function recent {
local mins="-$((${1:-5}+0))"
find . -type f -mmin $mins -print0 | xargs -0 /bin/ls -ltr
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment