General :: Shell Script To Check If Rpms Is Installed Or Not?
May 1, 2010
i have a input text file contain 10 rpms and they are old versions i need a shell script to check if these rpms is installed or not and if the newer version is installed and i need all the results in one output text file contain every rpm and its condition ( the same) or (new )or( not installed)
Is there a command to know " From where a specific RPM package was downloaded & installed ( The full HTTP/FTP path ) " ? For example, if I had previously installed Firefox from here [URL] is there a specific rpm query, or any other place, from where I can get the full ftp path back.
I'm just wondering if there is an easy way I can generate a list of RPM packages which have been forcefully installed on the system (got a couple of servers transitioned).
Okay, according to CUPS, I've installed this printer, but whenever I try to print, it tells me it's completed, but the printer does nothing. So I search a little and found some Canon Linux drivers from Canon Europe. I downloaded the RPM version, which gave me two files: cnijfilter-common-3.00-1.i386.rpm and cnijfilter-ip3600series-3.00-1.i386.rpm. So I installed the common file, followed by the ip3600 file, using rpm -ivh [file name] at command line. The RPM install went fine. However, what do I do now? I tried searching the CUPS list of printers, and nothing new is listed (oddly, CUPS seemed to have drivers for virtually every iPxxxx printer except the 3600 when I first installed). I tried restarting cups, no difference. I even tried to print (suspecting nothing had changed, but hoping) and it still thinks it's printing, but nothing comes out. What did installing those two RPMs do? Did it put a file somewhere that I need to reference in the cups admin page?
I have a disk of all the rpms (just the rpms) of RH Ent. 5.1. I needed to intall some packages from it.
For that I created a local repository.
Following is what I did:
1. mounted DVD in /media 2. Issued createrepo on /media (Now the packages are in /media/mycdrom/RHE5Rpms and the repodata is in /media) 3. I added the following in the /etc/yum.conf
Now when I try to install, for example, qt4-devel, it can resolve the dependencies for one level. For example, it resolves libpng-devel (which is needed by qt4-devel), but it fails to resolve libpng (which is needed by libpng-devel). But libpng package is both available in the DVD and is already installed on the machine.
Following is the tail of error messages I get after issuing the command 'yum install qt4-devel'
All the above packages are available through the DVD and already installed on the machine.
there is a folder. Its empty. When every I drag a new file and put into it it echo out "there is file in there" and keep monitoring the folder. How can I do it?
from nmap localhost | grep mysql command i will come to know whether mysql server is running or not.my problem is i want to test whether mysql server is running or not in shell script and if it is running i need to tell the user to stop the server to run the shell script.
I have two linux servers, they are backup together.
1. Server 1 have 3 files with name: file1, file2, file3 in the path: /etc/sysconfig/network-script/.
2. Server 2 have 3 files with name and path are the same as server 1.
- How to make a script to copy 3 files at server1 to overwrite on server2. But before overwrite, this script will check and compare the last modified date of these 3 files(on server1 and server2). if the modified date of file1, file2 or file3 on server1 is newer than 3 files on server2 then overwrite process will do, if not, will do nothing.
- see my script as below: it works find now but just overwrite. not check last modified date.
Actually i want my java code to connect to linux sendmail server. Right now i am using gmail pop protocol to connect to gmail server. So now i want to connect to sendmail server using pop and i read that using dovecot you can make sendmail to havepop and imap services. By default it has only SMTP support. So i want to know how can i check that i have dovecot installed or not, or my sendmail has pop or imap enable or not. Means by what command.
os: fedora 9how do i check if i have glut.h installed?actually,i tried to run graphics programs in KdevelopC/C++ ,i included the line#include<GL/glut.h>and it shows an error at all functions including glut functions when i compiled it.also i have gone to project->project options->configure options->linker flags->-lglut
I would like to know if there is other ways of checking what is installed in my RHEL other then using rpm -qa.I realised that some programs like firefox that i dl from the firefox website and unzip to use does not appear in the results from rpm -qa.
I want to use samba in one of my linux machines so that I can share my directories in linux in windows machine . How do I check in samba is installed or not . I checked in /etc/init.d directory , I expected smbd executables to be there . But I can't find it there . Does it mean that samba in not intstalled there
I have a doubt, suppose i have a module having different versions.I have installed one of these module, now i want to check module info of installed module, Is there any way to check it
I have an Ubuntu server in which a file is dumped every hour and a new file for the next hour and the process continues. If there is any problem due to which the creation of file stops then empty files are created every minute till the process is killed & started again. I need help to make a shell script to check if the empty files are being created and then kill the process and start it again.It would be a great help if anyone can help me regarding this.
I want to know that is there any command by which i can check which type of hardware devices are installed in my Linux box like SVGA,Sound Card,LAN Card.
Normally I find everything I need either in the documentation or forum, but it's been months, and this time I'm stumped. I'm posting the results of my latest tests, so I'm really sorry about the length of this post.
I can't play DVDs unless they've been burned by myself or a friend. I had no problems until around the beginning of April. I was running 11.2 on both my laptop and desktop. I think an update changed something. This was before 11.2 was officially retired a week or so later. I wanted to upgrade to 11.4 anyway, so I began with my laptop. During installation I wiped everything from my hard disk by creating new partitions and formatting them. After installation I installed the multimedia packages using one-click (opensuse-guide.org, not opensuse-community.org, although I did read what they said). I know one-click is not ideal, but I was curious. The result was that I still couldn't play DVDs.
I did a fresh installation, just to be on the safe side. This time I installed the packages according to Multi-media and Restricted Format Installation Guide by caf4926. But I still couldn't play DVDs, so I went through the thread Check your multimedia problem in ten steps. Then I ran mmcheck (v2.35). I tried a few times, experimented, and in the end did another fresh install.
In the meantime, on my desktop, which still has 11.2 on it, I found the file which had been changed and changed it back, so I could play DVDs on it again. It was in /etc/udev/rules.d/, 70-persistent-cd.rules. This does not appear to be the problem in 11.4 on my laptop.
I have again installed the packages according to the multimedia installation guide, and done the ten-step check and run mmcheck and these are the results as they stand:
I couldn't find a package called mplayerplug-in. I used zypper to look for it.
I tried installing the totem packages in a previous installation, but they didn't make a difference, so I left them out this time.
I deinstalled my jdk, but it doesn't seem to have made a difference, except that I get an error notification everytime I want to use LibreOffice. And I need it, so I'm putting it back soon.
So, these are my packages:
And this is what happens when I try to play a DVD using Kaffeine (since I don't an error message except from Kaffeine, and I've forgotten where my logs are):
And then comes Read error from: Error reading from DVD over the GUI.
And nothing else happens... I get no feedback from smplayer whatsoever. It opens, trys to read the DVD, and sits there. Even on the console.
I wanted to check what version of GRUB I have installed. I went to terminal and typed grub --versionI got this message back: The program 'grub' is currently not installed. You can install it by typing: sudo apt-get install grub
I am running Ubuntu 10.10 alongside windows xp pro. When I turn my pc on I have the option to boot to ubuntu or xp and at the top of the window it says that the version of grub running is "GNU GRUB Version 1.98+20100804-5Ubuntu-3" how I shold go about installing GRUB 2 or just leave it as is.
I am trying to write some small script file that will check if a USB stick is connected to my pc or not. I can't seem to get it to work, but I am sure it is a very simple fix.
I am running on Fedora core 10.Can anyone help me figure out what the problem is?If I run these lines through console it works fine (meaning, I type the commands in this file straight in the command line/console).
I have a file that's supposed to be growing in size 24/7. I want to check every 10 minutes via cron that it's actually growing. If not, send an email. Does anyone know how to write a script to do that?
I'm playing a game through wine (fullscreen), when I alt-tab back to my ubuntu desktop, the resolution doesn't change back, but stays at the game resolution.I'm currently using a shellscript that changes the resolution back to my origional resolution (using xrandr -s 0)
Is it possible to check which window has focus using a shellscript.If the game doesn't have focus change resolution to my origional resolution.