Determining the date a given port was installed

Clemens Lang cal at macports.org
Thu Jan 8 09:41:40 PST 2015


Hi,

----- On 8 Jan, 2015, at 18:32, Adam Mercer ramercer at gmail.com 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?

-- 
Clemens Lang


More information about the macports-users mailing list