How to create a txt log file of a "make install"?

I trying to install a program and I would like to see a txt file with the details of the operation. I think it is called a log file, am I right ?

Once, someone told me to do this command:

`make <install> file.txt 2>1 `

but it is not working. I need to see the details to know more about the problems and try to fix them. Please, if someone know how to do it I will be glad to know.

Thank you.

2 Answers

Actually I think it should be

make install >file.txt 2>&1.

Notice that

  1. There is not a left <. We are doing output redirection, so nothing to do with brackets.
  2. Use 2>&1 instead of 2>1. 2>1 will redirect stderr into a file named 1 instead of stdout.

Try this command:

make install > file.txt 2>&1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like