Created
May 21, 2012 22:17
-
-
Save joshwnj/2765034 to your computer and use it in GitHub Desktop.
give me a list of files from the month of May 2011
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## give me a list of files from the month of May 2011 | |
ls -laht --color=never | egrep 'May[ ]+[0-9]+[ ]+2011(.*)' | sed 's/.*2011 / /' | |
## move them to a separate directory | |
mkdir may-2011; ls -laht --color=never | egrep 'May[ ]+[0-9]+[ ]+2011(.*)' | sed 's/.*2011 / /' | xargs -I {} mv {} may-2011/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Handy :-)