Search code examples
linuxloggingserverconsolecapture

Save linux console output in txt. file


I'm just running an assetto corsa server on my linux server and Im wondering how it could be possible to "capture" the output of my console and save it in a txt file. (because AC hasn't a log system, but the console outputs nice information)


Solution

  • If you want to capture the ouput of your console while see it on your console at the same time:

    someCommand | tee --append someFile.txt 
    

    if you want to print in the .txt file the error message it it occurs:

    someCommand 2>&1 | tee --append someFile.txt