Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-07-2005, 06:12 AM
|
#1
|
Member
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877
Rep:
|
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.
|
|
|
03-07-2005, 07:41 AM
|
#2
|
Member
Registered: Aug 2003
Location: Melbourne Australia
Distribution: Debian Stretch
Posts: 374
Rep:
|
just add >filename
eg rpm - i program1.rpm >program1.log
|
|
|
03-07-2005, 07:53 AM
|
#3
|
Member
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877
Original Poster
Rep:
|
when i do that it just results in an empty file.
|
|
|
03-07-2005, 08:04 AM
|
#4
|
Member
Registered: Aug 2003
Location: Melbourne Australia
Distribution: Debian Stretch
Posts: 374
Rep:
|
mayb try
rpm -i 111.rpm |cat >filename.log
|
|
|
03-07-2005, 08:14 AM
|
#5
|
Member
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877
Original Poster
Rep:
|
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.
|
|
|
03-07-2005, 08:36 AM
|
#6
|
Member
Registered: Dec 2003
Location: Little Rock, AR
Distribution: Fedora Core 2, AIX, HP-UX, Solaris, Whitebox
Posts: 193
Rep:
|
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.
|
|
|
03-07-2005, 08:42 AM
|
#7
|
Member
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877
Original Poster
Rep:
|
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.
Last edited by dr_zayus69; 03-07-2005 at 08:59 AM.
|
|
|
03-07-2005, 09:03 AM
|
#9
|
Member
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877
Original Poster
Rep:
|
thanks i'll check out the link.
|
|
|
All times are GMT -5. The time now is 09:59 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|