1.1. Installation and Help
PV entire life for Pipe viewer, using it we can see the progress of the command execution.
# wgethttp://www.ivarch.com/programs/sources/pv-1.5.3.tar.bz2
# tar xjfpv-1.1.4.tar.bz2
# cdpv-1.1.4
#./configure
# make&& make Install
Example: The/home/opt directory needs to be called the package file name [email protected]
# tar-p-CF-/home/opt | PV--size ' du-sk/home/opt | Cut-f 1 ' k | Gzip>/home/[email protected] ' date +%y-%m-%d '. tar.gz
[Email protected]]# PV--help
Usage:pv[option] [FILE] ...
Concatenatefile (s), or standard input, to standard output,
Withmonitoring.
-P,--progress show progress bar
-T,--timer show elapsed time
-E,--eta show estimated time of arrival (completion)
-R,--rate Show data transfer rate counter
-A,--average-rate show data transfer average rate counter
-B,--bytes show number of bytes transferred
-T,--buffer-percent show percentage of transfer buffer in use
-A,--last-written num show num bytes last written
-F,--format format set output format to format
-N,--numeric output percentages, not visualinformation
-Q,--quiet do not output no transferinformation at all
-W,--wait display nothing until first bytetransferred
-S,--size size set estimated data size to size bytes
-L,--line-mode count lines instead of bytes
-0,--null lines is null-terminated
-I,--interval sec update every SEC seconds
-W,--width width Assume terminal is width characters wide
-H,--height height assume terminal is height rows high
-N,--name name prefix visual information with name
-F,--force output even if standard error isnot a terminal
-C,--cursor use cursor positioning escapesequences
-L,--rate-limit rate limit transfer to bytes per second
-B,--buffer-size BYTES use a buffer size of BYTES
-C,--no-splice never use splice (), always useread/write
-E,--skip-errors skip read errors in input
-S,--stop-at-size stop after--size bytes has beentransferred
-R,--remote PID update settings of process PID
-P,--pidfile file save process ID in file
-D,--WATCHFD PID[:FD] Watch file FD opened by process PID
-H,--help show this Help and exit
-V,--version show version information and exit
1.2. assist in backing up the database
[Email protected]_tools]# mysqldump-uroot-p123456--single-transaction--databases accounts |pv-q-L 10m |gzip>acco Unts.gzip
Warning:using a password on the command line interface can is insecure.
[Email protected]_tools]# gunzip-fc accounts.gzip |mysql-uroot-p accounts
Enterpassword:
--PV here to do the current limit around
Use PV to assist in backing up the database