commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
the --time-style argument to 'ls' takes several possible modifiers: full-iso, long-iso, iso, locale, +FORMAT.
The +FORMAT modifier uses the same syntax as date +FORMAT.
--time-style=+"%Y-%m-%d %H:%M:%S" strikes a happy medium between accuracy and verbosity:
ls -lart --time-style=long-iso
doesn't show time down to the nearest second,
ls -lart --time-style=full-iso
displays time to 10E-9 second resolution, but with no significant digits past the full seconds, also showing the timezone:
-rw-r--r-- 1 bchittenden bchittenden 0 2011-02-10 12:07:55.000000000 -0500 bar
There are 2 alternatives - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.