Syntax of tee command
tee [option] [file]
tee command options
To get help with tee command and display all options available for tee command use tee --help
command.
tee --help
tee --version
tee command usage with examples
free | tee memory.txt
Here I am using tee command pipe with free command and output of free command will be copied into memory.txt file.
By default, tee command overwrites the file. Using tee command with -a option do not overwrite the file but append it to the given file.
I am using tee command pipe with wc command. wc command is used for count number of lines, words and bytes count of a file. Here wc memory.txt | tee -a memory.txt
display
wc memory.txt | tee -a memory.txt
date | tee -a date.txt memory.txt
free | tee date.txt
echo learning tee command with programbr | tee -a date.txt
Linux command with examples
A
adduser | addgroup | alias | anacron | apt | aptitude | arp | at | atq | atrm | awk
B
basename | banner | batch | bc | bg | bzip
C
cat | cal | cd | chgrp | chown | cksum | chmod | clear | cmp | comm | cp
D
date | dd | df | diff | dir | dmidecode | du
E
echo | eject | env | exit | expr
F
G
grep | groups | gunzip | gzip
H
head | history | hostname | hostnamectl | htop | hwclock | hwinfo
I
id | ifconfig | ionice | iostat | ip | iptables | iw | iwlist
J
K
kill | kmod
L
last | less | ln | locate | login | lp | ls | lshw | lscpu | lsof | lsusb
M
man | mdsum | mkdir | more| mv
N
nano | nc | neofetch | netcat | netstat | nice | nmap | nproc
O
openssl
P
passwd | pidof | ping | pr | ps | pwd | pstree
Q
R
rdiff-backup | reboot | rename | rm | rmdir
S
scp | shred | shutdown | sleep | sort | split | ssh | stat | su | sudo | sum
T
tac | tail | talk | tar | tee | time | tree | top | touch | tr
U
unalias | uname | uniq | unzip | uptime | users
V
vim | vi
W
w | wall | watch | wc | wget | whatis | whereis | which | who | whoami
X
xargs
Y
yes | youtube-dl
Z
zcmp | zdiff | zip | zz