Skip to content

Instantly share code, notes, and snippets.

@gdhaworth
Created September 6, 2012 04:57
Show Gist options
  • Save gdhaworth/3651411 to your computer and use it in GitHub Desktop.
Save gdhaworth/3651411 to your computer and use it in GitHub Desktop.
An embeddable command that will find the most recently modified directory within the working directory.
#!/bin/sh
ls -ldt * | head -n 1 | tr -s ' ' | cut -d ' ' -f 9-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment