How do i store the output of an rpm or source to file?
Im trying to install an rpm and it has a good amount of dependencies and i want to know if i can add some option to place the output to a file and also if the same procedure would work for storing the output of ./configure if it doesn't build a config.log. I tried using redirection and the --pipe option. I tried rpm -Uvh --pipe > packagedep packname.rpm but it said no package stated to install.
|
just add >filename
eg rpm - i program1.rpm >program1.log |
when i do that it just results in an empty file.
|
mayb try
rpm -i 111.rpm |cat >filename.log |
i tried
rpm -Uvh packname.rpm | cat > packname.log rpm -Uvh packname.rpm | echo > packname.log echo rpm -Uvh packname.rpm > packname.log none worked. I think if i can some how make the output a variable and pass that variable to echo i can get the results i want. but not sure how to do that. |
With the standard redirect ( rpm ... > some.log) you are only catching the stdout, not the stderr. Try something like this:
rpm -Uvh packname.rpm > some.log 2>&1 That will redirect both stdout and stderr into the same log file. |
thanks that worked.
edit: While on the subject of redirection - I tried doing yum provides < packagename.log and it gave me the help screen. Im curious if i can some how get that to work. I don't want to know how, i'll research that on my own, but wanna know if it is possible. Maybe i can develop into a useful program. If i am successful i'll post about it on here. |
since linux is a great opportunity to learn things look at this:
http://www.tldp.org/LDP/abs/html/io-redirection.html |
thanks i'll check out the link.
|
All times are GMT -5. The time now is 01:36 AM. |