LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-26-2005, 02:35 PM   #1
leandean
Member
 
Registered: Oct 2005
Location: Burley, WA
Distribution: Sabayon, Debian
Posts: 278

Rep: Reputation: Disabled
xarg command


Greetings and Happy Holidays,

I have a machine with a three hdd RAID5. One drive failed completely and another had some (11) bad sectors. After replacing the failed drive I did a forced rebuild, rebuild tree, etc. I then replaced the drive with the bad sectors and rebuilt again.

The machine appears to be fine but to be sure I want to verify all the RPM packages.
I created a list of all the packages using the RPM query command. Now I want to verify that the packages are okay.

A friend suggested using xarg with the list I created to automate the task. There lies the rub. Documentation for xarg is scarce. After reading AwesomeMachines excellent DD command article the brain bulb lit up and came up with this post.

Not sure if it matters, but the machine:

SuSE 9.2 Pro
3Ware 8506
3 x 250GB SATA HDD
2.4GHz Xeon
2GB RAM
Intel board
This is a backup machine.

Thanks in advance.
 
Old 12-27-2005, 11:26 AM   #2
MassDosage
Member
 
Registered: Aug 2005
Location: London, UK
Distribution: Kubuntu
Posts: 75

Rep: Reputation: 15
One uses xargs to pass the output from one command as arguments to another command. So you can get a list of all the RPM's on your system by using

rpm -qa

and then have these handed over to another program using xargs. The question is, what is the command you want to call on the rpms to ensure that they are ok? I'm quessing you want to call "rpm --verify" in which case the entire command would look like:

rpm -qa | xargs rpm --verify
 
Old 12-28-2005, 12:07 AM   #3
leandean
Member
 
Registered: Oct 2005
Location: Burley, WA
Distribution: Sabayon, Debian
Posts: 278

Original Poster
Rep: Reputation: Disabled
Verify it is! Thanks a bunch. So as long as the -qa option passes output to the xargs option it will keep processing --verify? I'll pipe this into a text file and give it a try.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a single command to list all hardware installed (command line)? davee Linux - Hardware 6 02-28-2009 08:19 PM
Require Linux/Perl equivalent command for windows Command alix123 Programming 7 08-19-2005 03:23 AM
Key stroke/command to shut down x and go into the command prompt screen? Fear58 Linux - General 1 07-14-2004 08:14 PM
Command to display whole filestructure hierarchy f/ command line? mjewell Linux - Newbie 10 01-19-2004 11:48 AM
Where is Command line utility for Cups and command tutorial mossy Linux - Software 8 01-16-2004 01:24 AM


All times are GMT -5. The time now is 04:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration