make &> build.txt
All build outputs including warnings and errors will be redirected to build.txt. If without &, errors and warnings will not be redirected to the file.
A blog about coding
make &> build.txt
All build outputs including warnings and errors will be redirected to build.txt. If without &, errors and warnings will not be redirected to the file.
Remove those entries that have an error of “Permission Denied” :
find /opt -name dcm 2>/dev/null
Filter the output of a program and redirect the filtered result into a file:
./bin/programA -i ... -o ... 2>&1 | grep "keywords" > a.txt