summaryrefslogtreecommitdiffstats
path: root/usr.bin/tail
Commit message (Collapse)AuthorAgeFilesLines
* Add META_MODE support.sjg2015-06-131-0/+18
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Updated dependenciessjg2014-05-161-1/+0
| |
| * Updated dependenciessjg2014-05-101-0/+2
| |
| * Merge from headsjg2013-09-054-5/+18
| |\ | |/ |/|
| * sync from headsjg2013-04-121-1/+12
| |\
| * | Updated dependenciessjg2013-03-111-0/+1
| | |
| * | Updated dependenciessjg2013-02-161-2/+0
| | |
| * | Sync with HEAD.obrien2013-02-081-3/+2
| |\ \
| * | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+19
| | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | Print file names without stdio buffering to avoid mixing buffered andjh2013-06-094-5/+18
| |_|/ |/| | | | | | | | | | | | | | | | | unbuffered ouput. PR: bin/176886 Reviewed by: mjg
* | | Remove EOL whitespace accidentally introduced in r248393.joel2013-03-171-1/+1
| | |
* | | Add a couple of examples.joel2013-03-161-1/+12
| |/ |/| | | | | Obtained from: OpenBSD
* | Use calloc() to get zeroed memory.delphij2013-01-081-3/+2
|/ | | | MFC after: 1 month
* Add missing static keywords to tail(1)ed2011-11-062-4/+4
|
* tail: Fix crash if -F'ed file's filesystem disappears.jilles2011-08-141-2/+4
| | | | | | | | | | | | | If tail notices that a file it is following no longer exists (because stat() fails), it will output any final lines and then close the file. If the read operation also causes an error, such as when the filesystem is forcefully unmounted, it closes the file as well, leading to fclose(NULL) and a segmentation fault. PR: bin/159750 Submitted by: swills Approved by: re (kib) MFC after: 1 week
* Remove the advertising clause from UCB copyrighted files in usr.bin. Thisjoel2010-12-117-28/+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
* Build usr.bin/ with WARNS=6 by default.ed2010-01-021-1/+0
| | | | Also add some missing $FreeBSD$ to keep svn happy.
* ANSIfy various tools in usr.bin/.ed2010-01-021-1/+1
| | | | | Most of these tools properly build at WARNS=6, except for their K&R function declarations. Fix this, so we can bump WARNS as well.
* Use our canonical .Dd format.brueffer2009-11-021-1/+1
| | | | Submitted by: Ulrich Spoerlein
* Change the behaviour of -F slightly; it now persists (forever) inbrian2009-06-057-107/+144
| | | | | | | | | | | | | | | | | | trying to open files rather than giving up when it encounters an error. ENOENT errors are not reported. As a result, files that are moved away then recreated are not at risk of being 'lost' to tail. Files that are recreated and temporarily have unreadable permissions will be shown when they are fixed. This behaviour is consistent with the GNU version of tail but without the verbiage that goes with the GNU version. This change also fixes error messages accompanying -f and -F. They no longer report problems with (null)! MFC after: 3 weeks
* Nuking the temporary pointer once it is properly tracked in local storage.avatar2007-11-221-0/+1
| | | | | | | | | | | | | This should fix the double free() bug where there's no tailing newline(\n) character: current# echo -n test | tail testAssertion failed: (run->magic == ARENA_RUN_MAGIC), function arena_dalloc, file /usr/src/lib/libc/stdlib/malloc.c, line 2448. Abort (core dumped) Reviewed by: kib MFC after: 3 days
* initialize variables, WARNS=6 compliantcharnier2007-11-023-1/+3
|
* Fix various memory leaks.kib2007-10-171-3/+13
| | | | | | Submitted by: rdivacky Obtained from: OpenBSD MFC after: 1 week
* Markup revision.ru2006-12-241-20/+20
|
* Better handle the -F case:marcel2006-10-211-7/+5
| | | | | | | | | | | | | | | | | o When stat(2) fails (i.e. the file has been moved) there's no new file with the same name yet, so keep showing the file that's open. This yields the same behaviour as -f, for which we don't stat(2). o When a new file with the same name has been created (i.e stat(2) succeeds but the inode or device numbers differ from the opened file), show any new lines in the opened file (i.e. the old or rotated file) before reopening the new file. These changes fix the observed behaviour that tail(1) doesn't show the very last lines of the rotated (log) files. PR: bin/101979 Tested by: Jos Backus <jos@catnook.com> MFC after: 2 months
* - Simplify the formatting in the SYNOPSIS.ru2006-06-302-4/+3
| | | | - Add the forgotten new option in usage().
* Add a -q option to suppress header lines when multiple files are specified.flz2006-06-294-8/+19
| | | | | Approved by: cperciva (mentor) MFC after: 1 week
* Unbreak tail -f on non-local filesystems.ps2005-08-261-0/+10
|
* Back out revision 1.19 and 1.20 until I find mental clarity to deal witheivind2005-06-011-1/+7
| | | | issues bde pointed out.
* Remove an errno reset that became unnecessary.eivind2005-05-261-1/+0
| | | | Noticed by: juli
* We are past 4.4BSD - use our new-found stat flags for pipes and fifos.eivind2005-05-261-6/+1
|
* Don't skip the initialisation of tl->len when we hit an EOF immediatelyiedowse2005-03-201-3/+2
| | | | | | after allocating a new buffer. This bug caused `tail -r < /dev/null' to core dump when the `J' malloc option is set, and also affected any other input that was an exact multiple of 128k.
* Save last displayed file by having the "last" pointer global and save itdelphij2005-02-041-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | during we show the first file's tail. Instead of: tarsier% tail -f 1 2 ==> 1 <== foo bar ==> 2 <== bar foo ==> 2 <== bar2 foo2 Now with this change, we have: tarsier% tail -f 1 2 ==> 1 <== foo bar ==> 2 <== bar foo bar2 foo2 While I'm there, move a comment to where it should belong to. Also, const'ify the "last" static because we will never need to change the contents it points to. MFC After: 1 week
* Added the EXIT STATUS section where appropriate.ru2005-01-171-1/+1
|
* Don't reprint file names unnecessarily.brian2005-01-121-4/+4
| | | | | | PR: 75028 Submitted by: mteterin at 250-217 dot customer dot cloud9 dot net MFC after: 7 days
* Bump WARNS to 4 as this seems OK on the alpha now.dwmalone2005-01-101-1/+1
|
* Cast size_t to off_t before adding them to avoid warnings on the alpha.dwmalone2005-01-102-4/+6
| | | | Use %ld and intmax_t for printing an off_t.
* Some variables became unused or global in the last change to thisdwmalone2005-01-101-9/+5
| | | | | | | file. Remove the now redundant declarations. Add declarations for the new show and set_events functions and make them static.
* Add support for following more than one file i.e.paul2004-11-043-96/+200
| | | | tail -f file1 file2
* Revert a WIP change that shouldn't have been in last commit.paul2004-11-031-4/+2
|
* Convert to ANSI style function definitions.paul2004-11-035-31/+12
|
* Mechanically kill hard sentence breaks.ru2004-07-021-1/+1
|
* Removed check of st_rdev changing in the -F support. st_rdev for regulardg2003-08-141-1/+0
| | | | | | | | | | | files is usually the first direct block pointer. Since FreeBSD does automatic block reallocation to reduce filesystem fragmentation, the file being tailed can be relocated to different blocks 'on-the-fly', making the check for st_rdev unreliable. The result of this bug is tail -F pseudo-randomnly thinking the file was rotated when it wasn't, and as a result, spews out the entire file trying to catch up. MFC after: 3 days
* Revert part of the last commit. This fixes tail for pipes.markm2003-06-101-8/+7
| | | | Submitted by: joerg
* When doing tail -F, return if the freopen() of the file fails instead oftjr2002-12-151-0/+1
| | | | trying to use a null file pointer.
* revert WARNS=4, it makes the alpha compile sad.alfred2002-07-151-1/+1
|
* WARNS=4, addalfred2002-07-142-6/+5
|
* Note that this appeared at least as early as PWB UNIX.jmallett2002-06-101-2/+1
| | | | Use the literal string 'PWB UNIX', as we still have no .At macro for it.
* Fix up vendor IDs.dwmalone2002-04-131-7/+10
| | | | Put a sequence point between writing to a variable and using it.
OpenPOWER on IntegriCloud