Sunday 20 January 2019

arch linux - ArchLinux - yaourt: save updatelog?


When I do yaourt -Syu sometimes there is such a long log in the console so that the buffer gets full and some information is lost. As the information is important sometimes I´d like to save everything that´s logged by yaourt/pacman in a file.


Doing yaourt -Syu > file does save things to file, but then you cannot see what´s going on in the console. Is it possible to have both?



Answer



Yes, pipe it to tee


From the tee man page:


NAME
tee - read from standard input and write to standard output and files

SYNOPSIS
tee [OPTION]... [FILE]...

DESCRIPTION
Copy standard input to each FILE, and also to standard output.

So your command should be yaourt -Syu | tee yaourt.log


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...