DragonFly On-Line Manual Pages

Search: Section:  


CF(1)                  DragonFly General Commands Manual                 CF(1)

NAME

cf - unix time to formated time and date filter

SYNOPSIS

cf [-f fmt] [-lpsu] [file ...]

DESCRIPTION

This filter reads the named files (or from stdin if there are none) and replaces numeric timestamps found at the beginning of each line with a formated time and date time and date. For example: % echo '1074558944 default format' | cf Jan 19 16:35:44 default format The CFTIMEARGS environment variable can be used to specify a default set of flags. However, this is only honored if no flags are specified on the command line. Also, the only escapes recognized are ', " and \.

OPTIONS

-f fmt Specify a strftime(1) format string. For example: % echo '1074558944 custom format' | cf -f %F-%T 2004-01-19-16:35:44 custom format Using an empty format causes cf to revert to its default format ("%b %e %T"). -l Use the long format which appends the year ("%Y"). For example: % echo '1074558944 long format' | cf -l Jan 19 16:35:44 2004 long format -p Preserve sub-second timestamp info. For example: % echo '1100980501.867105 preserve format' | cf -p Nov 20 11:55:01.867105 preserve format -s Do strict checking of the timestamp. The number is only considered to be a valid timestamp and converted if it 9 or more characters long and contains one or less dots. -u Format using UTC (Coordinated Universal) instead of local time.

SEE ALSO

hf(1), strftime(3) 4th Berkeley Distribution January 22, 2006 CF(1)

Search: Section: