coreutils

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

README

#tee

简介

tee 在完成gnu tee 功能命令基础上,并增强tee命令。

install

env GOPATH=`pwd` go get -u github.com/guonaihong/tee

命令行选项

Usage of tee:
  -A, --max-archive int
    	How many archive files are saved
  -a, --append
    	append to the given FILEs, do not overwrite
  -g, --gzip
    	compressed archived log files
  -s, --max-size string
    	current file maximum write size

提供对日志文件的自动归档和裁减

  • bash 内容
while :;
do
    date
done
  • tee命令保证始终只有10个归档文件(.gz)
bash loop.sh | tee -A 10 -g -a my.log

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL