Determining the date a given port was installed
Ryan Schmidt
ryandesign at macports.org
Thu Jan 8 10:27:57 PST 2015
On Jan 8, 2015, at 11:41 AM, Clemens Lang wrote:
>>> $ ls -lT $(port -q location zlib) | awk '{print $6" "$7" "$8" "$9}'
>>> Sep 21 03:27:38 2014
>
> I agree, that's a lot simpler. But why rely on the output formatting of ls
> and use awk to parse it? Why not just
>
> $> stat -t '%Y-%m-%d %H:%M' -f '%Sc' "$(port -q location zlib)"
>
> which allows you to change the output formatting and doesn't print anything
> but the requested time?
I wasn't aware of the stat command. Good to know!
More information about the macports-users
mailing list