Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 634 Bytes

tee.md

File metadata and controls

41 lines (30 loc) · 634 Bytes

tee: add output to file

The tee command takes the format of:

tee [ -a ] [ File ]

The following command only displays output on the screen (stdout)

pwd

will display output like this: (matching your selected username)

/home/pulsys

The same command directs the output to a file

pwd > file
cat file

you will see output like this: (matching your selected username)

/home/pulsys

By using a pipe to tee we can display on stdout AND direct to a file

pwd | tee file.txt

you will see output like this: (matching your selected username)

/home/pulsys