]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tailf: deprecated
authorRuediger Meier <ruediger.meier@ga-group.nl>
Fri, 13 Mar 2015 15:09:36 +0000 (16:09 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 16 Mar 2015 13:26:47 +0000 (14:26 +0100)
We want to remove it in 2 years, March 2017.

See discussion "tailf, really needed?"
http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/10967

[kzak@redhat.com: - move warning to usage()]

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Signed-off-by: Karel Zak <kzak@redhat.com>
Documentation/deprecated.txt
tests/expected/tailf/simple
text-utils/tailf.1
text-utils/tailf.c

index fc31ece5d072d3dea3f9c028573c876b5979a462..11f4d1fa35c57c3661dc7f4232bd4be0be4e98f7 100644 (file)
@@ -3,6 +3,11 @@ deprecated utils are in maintenance mode and we keep them in source tree for
 backward compatibility only.
 
 
+what:  tailf
+why:   "tail -f" is better nowadays, tailf has unfixed bugs
+
+--------------------------
+
 what:  sfdisk --show-size
 why:   this does not belong to fdisk, use "blockdev --getsz"
 
index ddf72de36443821ee3f78c27070cf16c57912a5c..5edc76b2e3022b0f2d2c02419b3f9b1561fd2f0c 100644 (file)
@@ -1,2 +1,3 @@
+tailf: warning: use of 'tailf' is deprecated, use 'tail -f' instead
 a b c d e f g h i j k l m n o p q r s t u v w x y z
 0 1 2 3 4 5 6 7 8 9
index d59c5317b7256df993b509a7de941df4e3b62790..9c6bd6adeaf7473b91e06ca38f1e5b925db592bb 100644 (file)
@@ -29,6 +29,12 @@ tailf \- follow the growth of a log file
 [option]
 .I file
 .SH DESCRIPTION
+.B tailf is deprecated.
+It may have unfixed bugs and will be removed in March 2017. Nowadays it's safe
+to use
+.B tail -f
+(coreutils) in contrast to the original documentation below.
+.PP
 .B tailf
 will print out the last 10 lines of the given \fIfile\fR and then wait
 for this \fIfile\fR to grow.  It is similar to
index 603904924f959d0dc10ca61dc9a088010b579f67..d05987af7b8c7f5ebc8b798e45f31fa0e92306f2 100644 (file)
  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * This command is deprecated.  The utility is in maintenance mode,
+ * meaning we keep them in source tree for backward compatibility
+ * only.  Do not waste time making this command better, unless the
+ * fix is about security or other very critical issue.
  *
- * less -F and tail -f cause a disk access every five seconds.  This
- * program avoids this problem by waiting for the file size to change.
- * Hence, the file is not accessed, and the access time does not need to be
- * flushed back to disk.  This is sort of a "stealth" tail.
+ * See Documentation/deprecated.txt for more information.
  */
 
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -202,6 +207,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE *out)
        fputs(USAGE_HELP, out);
        fputs(USAGE_VERSION, out);
        fprintf(out, USAGE_MAN_TAIL("tailf(1)"));
+       fputs(_("Warning: use of 'tailf' is deprecated, use 'tail -f' instead.\n"), out);
 
        exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
 }