Quote:
Originally Posted by satimis
3)
$ locate test.txt | tee -a /path/to/output.txt
locate: warning: database `/var/cache/locate/locatedb' is more than 8
days old
It won't add the warning on the file.
|
to get errors and warnings in the output file, you need to redirect them
Code:
$ locate test.txt 2>&1 | tee -a /path/to/output.txt