From 0f4192e6b2994add1bdf659816d23ab1218b2094 Mon Sep 17 00:00:00 2001 From: FRIGN Date: Thu, 19 Feb 2015 18:58:19 +0100 Subject: [PATCH] Update usage and add actual d-parsing to touch(1) --- touch.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/touch.c b/touch.c index 70adc31..8c488f1 100644 --- a/touch.c +++ b/touch.c @@ -102,7 +102,7 @@ parsetime(char *str, time_t current) static void usage(void) { - eprintf("usage: %s [-acm] [-r ref_file | -t timestamp] file ...\n", argv0); + eprintf("usage: %s [-acm] [-d time | -r ref_file | -t time | -T time] file ...\n", argv0); } int @@ -119,6 +119,9 @@ main(int argc, char *argv[]) case 'c': cflag = 1; break; + case 'd': + t = parsetime(EARGF(usage()), t); + break; case 'm': mflag = 1; break;