summaryrefslogtreecommitdiffstats
path: root/usr.bin/touch
Commit message (Collapse)AuthorAgeFilesLines
* Constify where appropriate.eadler2013-04-231-2/+2
| | | | | | Reported by: emaste Approved by: cperciva (mentor) MFC After: 3 days
* Cleanups to touch.ceadler2013-04-231-20/+22
| | | | | | | | | | - use const where appropriate - use static where appropriate - use explicit checks checks for error conditions Reviewed by: sbruno Approved by: cperciva (mentor) Obtained by: DragonFlyBSD
* touch: Add the -d option from POSIX.1-2008.jilles2012-06-102-5/+95
| | | | | | | | | | This is much like -t but with a different format which is ISO8601-like and allows fractions of a second. The precision is limited to microseconds because of utimes() and friends, even though stat() returns nanoseconds. MFC after: 10 days
* Remove trailing whitespace per mdoc lint warningeadler2012-03-291-6/+6
| | | | | | | Disussed with: gavin No objection from: doc Approved by: joel MFC after: 3 days
* Remove useless and potentially dangerous rw() function which tries tojh2012-02-042-67/+8
| | | | | | | | | | update access and modification times by reading and writing the file. chmod(2) in rw() doesn't help because utimes(2) allow owner and the super-user to change times. Using just utimes(2) should be sufficient. The -f option becomes no-op. Reviewed by: jilles
* Remove the advertising clause from UCB copyrighted files in usr.bin. Thisjoel2010-12-112-8/+0
| | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson
* Change all our own code to use st_*tim instead of st_*timespec.ed2010-03-281-6/+6
| | | | Also remove some local patches to diff(1) which are now unneeded.
* - If lstat()/stat() fails with an error other than ENOENT, don't ignorejh2009-10-161-4/+11
| | | | | | | | | | | | | | | the error and assume that the file doesn't exist. Touch could return success with -c option even if the file existed and time was not set. - If the first utimes_f() call fails with -A option, give up and don't continue trying to set times to current time. [1] - Set exit status to 1 when setting of timestamps fails for a directory or symbolic link even though lstat()/stat() would succeed. - Don't print bogus error message when rw() succeeds. PR: bin/112213 Submitted by: jilles [1] Reviewed by: jilles Approved by: trasz (mentor)
* Update to match revision 1.23 of touch.c.grog2007-04-101-36/+18
| | | | Clarify some details.
* Usage: print base name of program.grog2007-04-101-20/+47
| | | | | | | -A flag: respect the -a and -m flags. imply the -c flag. Requested in principle by: brian
* Add -A flag to adjust existing time stamps.grog2007-04-092-23/+130
| | | | | | Print name by which program was started in usage() message. MFC after: 2 weeks
* Don't set time to current, if set to specific time failsache2006-01-311-0/+1
| | | | PR: 92577
* Expand *n't contractions.ru2005-02-131-1/+1
|
* Sort sections.ru2005-01-181-7/+7
|
* Added the EXIT STATUS section where appropriate.ru2005-01-171-1/+1
|
* ANSIify function definitions.dwmalone2002-09-041-18/+6
| | | | | | | | | Add some constness to avoid some warnings. Remove use register keyword. Deal with missing/unneeded extern/prototypes. Some minor type changes/casts to avoid warnings. Reviewed by: md5
* Replace various spelling with FALLTHROUGH which is lint()ablecharnier2002-08-251-1/+1
|
* Remove local prototypes for main().jmallett2002-08-191-1/+0
|
* Handle directories correctly.eric2002-07-231-3/+6
| | | | | PR: 40801 MFC after: 5 days
* remove __Pimp2002-03-221-6/+6
|
* WARNS=2 is going to be the default, so don't specify it. Use __FBSDID().markm2001-12-112-6/+5
|
* Clarify that -h implies -c.obrien2001-09-241-0/+5
|
* blah, remove debugging code that crept in with last commit.obrien2001-09-231-1/+0
|
* Add the 'h' flag to operate on symlinks rather than what they point to.obrien2001-09-222-6/+19
|
* mdoc(7) police: utilize the new .Ex macro.ru2001-08-151-3/+1
|
* Fix some trivial warnings and clamp down with WARNS=2kris2001-05-262-2/+9
| | | | MFC after: 1 week
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-1/+1
|
* Add DIAGNOSTICS section namecharnier2000-03-261-1/+1
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Add $Id$, to make it simpler for members of the translation teams tonik1999-07-121-0/+1
| | | | | | | | | | | | | | | | | track. The $Id$ line is normally at the bottom of the main comment block in the man page, separated from the rest of the manpage by an empty comment, like so; .\" $Id$ .\" If the immediately preceding comment is a @(#) format ID marker than the the $Id$ will line up underneath it with no intervening blank lines. Otherwise, an additional blank line is inserted. Approved by: bde
* Clean up some ambiguous nested if/elses.billf1999-07-041-1/+2
|
* Brucify.des1999-05-121-2/+1
|
* Sync usage() with man page.des1999-05-111-2/+2
| | | | | PR: 11539 Submitted by: Ruslan Ermilov <ru@ucb.crimea.ua>
* Merge from 2_2 man page change.danny1999-01-052-2/+2
|
* PR: 9323danny1999-01-051-1/+4
| | | | | | Submitted by: ishisone@sra.co.jp Make touch handle years 2000-2038 in the obsoleted format, rather than 1902-1969 as was previously the case with two digit year spec.
* Don't assume that time_t is long.bde1998-06-291-2/+6
|
* Cosmetic.charnier1997-08-181-12/+12
|
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-291-1/+1
| | | | posix standard on the topic.
* Don't use __dead or __pure in user code. They were obfuscationsbde1996-09-141-1/+1
| | | | | | for gcc >= 2.5 and no-ops for gcc >= 2.6. Converted to use __dead2 or __pure2 where it wasn't already done, except in math.h where use of __pure was mostly wrong.
* YY --> CCadam1996-09-101-2/+2
|
* PR # bin/274joerg1995-07-081-1/+1
| | | | | | | | | | | | > The command: > > touch -t 199504011200 testfile > > gives the error message: > > touch: out of range or illegal time specification: [[CC]YY]MMDDhhmm[.SS] Submitted by: mpp@legarto.minn.net (Mike Pritchard)
* Remove trailing whitespace.rgrimes1995-05-301-1/+1
|
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-273-0/+514
OpenPOWER on IntegriCloud