LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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


Closed Thread
  Search this Thread
Old 11-04-2014, 08:51 AM   #1
vipinsqa
Member
 
Registered: Oct 2014
Posts: 40

Rep: Reputation: Disabled
Packages installed and install location.


Hi Guys,

I am using below commands to generate a list of packages and their location and dump to an output file.

rpm -qa -last > $HOME/MyLog/installed_packages_$HOSTNAME.log

rpm -ql $(rpm -qa -last) >> $HOME/MyLog/installed_packages_location_$HOSTNAME.log

Now, the problem is, the packages are dumped first to the log file and then their install locations - which is weird as I cant relate packages to their install location.

I would need name of package to be dumped in a log file, its install location to be dumped, again the name of second package, its install location and so on..

Can anyone please confirm how can I achieve this? Can I use a nested loop to dump between files? Kindly help with the code snippet using above two commands. Any help will be appreciated.

Regards.
 
Old 11-06-2014, 12:48 PM   #2
vipinsqa
Member
 
Registered: Oct 2014
Posts: 40

Original Poster
Rep: Reputation: Disabled
List services running on Linux box along with the respective package location-Urgent!

Hi Guys,

I need a list of services running on Linux host and their respective package/install location.
I know of service --status-all command to retrieve a list of all running services. However, I would need services + the corresponding package details i.e. the application hosting this service.

This is a bit urgent for me to deliver. Anyone has any clue how can we get this on Centos box?

Thanks in advance.

Regards.
 
Old 11-06-2014, 02:24 PM   #3
ondoho
Senior Member
 
Registered: Dec 2013
Posts: 4,176

Rep: Reputation: 837Reputation: 837Reputation: 837Reputation: 837Reputation: 837Reputation: 837Reputation: 837
i have seen this thread on some other forum, where you were told that:
a) it's not that simple
b) be more precise (what's a service?)
c) nobody's going to write that script for you

it seems you weren't happy being told that, and did not provide any additional (and, may i say, real) info, and the thread just died.

now you're trying it here again - twice in slightly different wording.
how many more times will you try? are you honestly hoping the answers will be any different?
 
Old 11-06-2014, 03:17 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

http://www.linuxquestions.org/questi...8/#post5265711

Closed the original in favour of the dupe w/ helpful results.
 
  


Closed Thread


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
How do I see a list of services running mikebarnes55 Linux - Newbie 2 10-28-2014 07:28 PM
is there a command that will list all running services baronobeefdip Linux - General 7 10-27-2014 04:48 PM
how do i list all the running services in FreeBSD baronobeefdip *BSD 3 04-10-2011 12:17 PM
List running services on remote unix box say_hi_ravi Linux - Newbie 6 01-24-2011 09:24 AM
How do I get a list of services running on my computer? imsam Linux - Newbie 4 10-27-2004 01:59 AM


All times are GMT -5. The time now is 12:42 PM.

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