Skip to content

Instantly share code, notes, and snippets.

@quickshiftin
Created February 10, 2014 19:35
Show Gist options
  • Save quickshiftin/8922629 to your computer and use it in GitHub Desktop.
Save quickshiftin/8922629 to your computer and use it in GitHub Desktop.
BASH alias to get the last downloaded file on OSX
alias lastd='echo ~/Downloads/$(ls -t ~/Downloads/ | head -n 1)'
@quickshiftin
Copy link
Author

# Copy the last downloaded file to the current working directory
cp "$(lastd)" .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment