Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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