pkg list installed by date

Matthew Seaman matthew at FreeBSD.org
Wed Sep 9 07:05:12 UTC 2015


On 08/09/2015 22:52, jungle Boogie wrote:
> Hello,
> 
> Requesting help with simple query.
> 
> I want to list installed packages by their install/update timestamp.
> 
> % pkg query %n-%t
> and
> % pkg query %t-%n
> 
> List packages installed alphabetically.

pkg-query(8) doesn't provide any sorting capabilities.  However, it is
fairly trivial to pipe the output into sort(1)

> Also is the %t UTC or local time?

Neither.  It's the unix time -- seconds since the epoch, where the epoch
date is:

% env TZ=UTC date -j -f %s 0
Thu Jan  1 00:00:00 UTC 1970

or the same time in whatever timezone you inhabit.

	Cheers,

	Matthew


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 957 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-pkg/attachments/20150909/18cd027f/attachment.bin>


More information about the freebsd-pkg mailing list