Last active
August 29, 2015 14:19
-
-
Save swards/e3e9442bda4adafbbed1 to your computer and use it in GitHub Desktop.
In Ruby - List all files and order by the day they were last modified. Note, irb is launched from the rails application directory. This is very helpful if your contracting and want to see what files have changed recently.
This file contains hidden or 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
$ irb | |
> puts Dir['app/**/*'].sort_by{ |f| File.mtime(f) }.map{|f| "#{f} #{" " * (80-f.length)} #{File.mtime(f).strftime('%m%d')}"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment