Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


Closed Thread
  Search this Thread
Old 11-04-2014, 07:51 AM   #1
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.

Old 11-06-2014, 11:48 AM   #2
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.

Old 11-06-2014, 01:24 PM   #3
LQ Addict
Registered: Dec 2013
Posts: 12,471
Blog Entries: 9

Rep: Reputation: 3375Reputation: 3375Reputation: 3375Reputation: 3375Reputation: 3375Reputation: 3375Reputation: 3375Reputation: 3375Reputation: 3375Reputation: 3375Reputation: 3375
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, 02:17 PM   #4
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912
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.

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

All times are GMT -5. The time now is 02:46 PM.

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