-   Linux - Software (
-   -   How do i store the output of an rpm or source to file? (

dr_zayus69 03-07-2005 07:12 AM

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.

cadj 03-07-2005 08:41 AM

just add >filename

eg rpm - i program1.rpm >program1.log

dr_zayus69 03-07-2005 08:53 AM

when i do that it just results in an empty file.

cadj 03-07-2005 09:04 AM

mayb try

rpm -i 111.rpm |cat >filename.log

dr_zayus69 03-07-2005 09:14 AM

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.

looseCannon 03-07-2005 09:36 AM

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.

dr_zayus69 03-07-2005 09:42 AM

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.

perfect_circle 03-07-2005 09:57 AM

since linux is a great opportunity to learn things look at this:

dr_zayus69 03-07-2005 10:03 AM

thanks i'll check out the link.

All times are GMT -5. The time now is 04:08 PM.