How to pipe to file and screen in linux
To do this we use the command tee.. eg
ls -la | tee filename.txt #or (as shown in my backup script) rsync -aAXv $DIR* $BKDIR | tee -a $LOG
Note: ‘tee -a’ appends to file instead of the default overwrite.
Feeding Your Inner Developer
To do this we use the command tee.. eg
ls -la | tee filename.txt #or (as shown in my backup script) rsync -aAXv $DIR* $BKDIR | tee -a $LOG
Note: ‘tee -a’ appends to file instead of the default overwrite.
Recent Comments