I have some understanding of how the stdout and stderr file descriptors work. But sometimes they don’t catch all the output and I trying to understand why.
For example, cloning into a git repo gives the following output:
$ git clone [email protected]:Alex23rodriguez/MyRepo
Cloning into 'MyRepo'...
remote: Enumerating objects: 438, done.
remote: Counting objects: 100% (438/438), done.
remote: Compressing objects: 100% (319/319), done.
remote: Total 438 (delta 96), reused 410 (delta 68), pack-reused 0
Receiving objects: 100% (438/438), 13.09 MiB | 1.73 MiB/s, done.
Resolving deltas: 100% (96/96), done.
but redirecting both stdout and stderr to a file gives unexpected results
$ git clone [email protected]:Alex23rodriguez/MyRepo &> log
(no output)
$ cat log
Cloning into 'MyRepo'...
My question is, what happened to the rest of the printed lines?
git clone --progressto be able to get the full output. Also it seems you can useunbuffer git clone https://....