Date: Sun, 02 Jan 2022 02:15:40 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 260871] [patch] /usr/bin/touch enhancement Message-ID: <bug-260871-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260871 Bug ID: 260871 Summary: [patch] /usr/bin/touch enhancement Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: jamie@catflap.org Created attachment 230614 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=230614&action=edit patch to add "-R" to touch(1) I'm not quite sure how you deal with "non-standard" additions to standard commands, so please be gentle! Incidentally, I have no preference for actual implementation, this is just what I've been using for a while. Comments welcome! Basically, touch(1) has: -h If the file is a symbolic link, change the times of the link itself rather than the file that the link points to. and: -r Use the access and modifications times from the specified file instead of the current time of day. If "-r" points to a link, the link is always followed to retrieve the datetime information. I have a program that needs to "-r" the datetime of the link itself if the file is a link. Up to now, I've been doing a stat of the file, and then forming the date to add, but recently thought to add this option: -R As -r , but if the file is a symbolic link, return the times of the link itself rather than the file that the link points to. Patch attached. Comments? -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-260871-227>
