NAME
tee – read from standard input and write to standard output and files
SYNOPSIS
tee [OPTION]… [FILE]…
DESCRIPTION
Copy standard input to each FILE, and also to standard output. -a, –append append to the given FILEs, do not overwrite -i, –ignore-interrupts ignore interrupt signals –help display this help and exit –version output version information and exit If a FILE is -, copy again to standard output.
Usage and Examples:
Example 1: Write output to display, and to a file
$ ls -la | tee file1
Example 2: Search word strings and pipe to file “Sudo_Usages”
$ ls -la /var/log | grep SSH | tee Sudo_Usages
Example 3: Output stored in more than one files
$ ls -la /etc/ | tee file1 file2 fileN
Recent Comments