Skip to content

Instantly share code, notes, and snippets.

@alex-moreno
Created January 28, 2016 15:17
Show Gist options
  • Save alex-moreno/2f4d1e0dfc856658faec to your computer and use it in GitHub Desktop.
Save alex-moreno/2f4d1e0dfc856658faec to your computer and use it in GitHub Desktop.
Get the newest file of those in the current folder
DB_BACKUP_PATH="$(pwd)/$(ls -t | grep \.sql\.gz$ | head -n1)"
echo $DB_BACKUP_PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment