There is no "universal" command that is guaranteed to work on *ALL* UNIX/Linux flavors.
RHEL-based have rpm, Solaris has pkginfo, Debian-based have dpkg, I don't know about Arch but you get the point.
A simpler generic approach would be to find / -type f -name "sshd" but it's not bulletproof.
Another option would be to match your commands against /etc/*release but -again- it's not bulletproof either; I've seen several sysadmins modify this file in order to trick the system so that they can install unsupported applications (Oracle for example). Something like this:
The above code for instance won't work on a Linux minimal installation as it relies on "egrep" command.
It would be easier if you were looking for running processes; ps almost works the same in all Unix/Linux (either ps -A or ps -e should do).
rshstatus=`rsh -n lilo /db/p2/oracle/names9208/restart_names.sh`
if $rshstatus <>0 then
errstatus=1
mailx -s "xirsol8dr" ordba@xxx.com >> $log_dr
else if errstatus=0
echo "status to xirsol8dr successful"
can anyone provide if this is t he correct way to do this or is there a better way? (1 Reply)
Hm am the perfect newbie:o
I handle an application on a production servers having a SunOS 5.8 and iplanet webserver instance. Users trying to access it on https are getting "Cannot find the server". I checked with the n/w and secuirty and they said traffic is allowed to the server. Everything... (6 Replies)
Hi all,
I had a large application created using Visual C++. I ported that application using WINE to the Linux platform (ofcourse x86). Now I have to port the same application to AIX which runs over IBM mainframe. I dont have mainframe available but it is required for me to port my application to... (1 Reply)
I am trying to list all the applications that is installed on my sun solaris box.
I have used the command pkginfo but it only give me the applications that was bundled with solaris. This machine runs oracle and pkginfo command does not list that.
Any idea to get to list all the applications... (1 Reply)
Hi,
I need to query and find out if anyone is logged into a Linux box or if the Linux Box is free available for login. This information is required to post the availability of the Linux Host for an instrument for another user to start using the instrument.
Is there a command or script to query... (3 Replies)
Hi , if I copy an application directory (with all its subdirectories) from one unix box to another (suppose same version), will that application work in the 2nd unix box? (3 Replies)
Hi,
I want to determine whether my java application is pointing to the OS version of Java or the User installed Java version on my Unix box.
I am aware of the "java -version" command, however I am unsure if the version returned is the OS one or the user one.
Please help.
Ali. (5 Replies)
Hello Forum,
I'm issuing a one line bash command to look for the version of an installed application and saving the result to a variable like so:
APP=application --version
But if the application is not installed I want to return to my variable that the Application is not installed. So I'm... (2 Replies)
Discussion started by: greavette
2 Replies
LEARN ABOUT LINUX
ubuntu-bug
apport-bug(1) General Commands Manual apport-bug(1)NAME
apport-bug, apport-collect - file a bug report using Apport, or update an existing report
SYNOPSIS
apport-bug
apport-bug symptom | pid | package | program path | .apport/.crash file
apport-collect report-number
DESCRIPTION
apport-bug reports problems to your distribution's bug tracking system, using Apport to collect a lot of local information about your sys-
tem to help the developers to fix the problem and avoid unnecessary question/answer turnarounds.
You should always start with running apport-bug without arguments, which will present a list of known symptoms. This will generate the most
useful bug reports.
If there is no matching symptom, you need to determine the affected program or package yourself. You can provide a package name or program
name to apport-bug, e. g.:
apport-bug firefox
apport-bug /usr/bin/unzip
In order to add more information to the bug report that could help the developers to fix the problem, you can also specify a process ID
instead:
$ pidof gnome-terminal
5139
$ apport-bug 5139
As a special case, to report a bug against the Linux kernel, you do not need to use the full package name (such as linux-
image-2.6.28-4-generic); you can just use
apport-bug linux
to report a bug against the currently running kernel.
Finally, you can use this program to report a previously stored crash or bug report:
apport-bug /var/crash/_bin_bash.1000.crash
apport-bug /tmp/apport.firefox.332G9t.apport
Bug reports can be written to a file by using the --save option or by using apport-cli.
apport-bug detects whether KDE or Gnome is running and calls apport-gtk or apport-kde accordingly. If neither is available, or the session
does not run under X11, it calls apport-cli for a command-line client.
UPDATING EXISTING REPORTS
apport-collect collects the same information as apport-bug, but adds it to an already reported problem you have submitted. This is useful
if the report was not originally filed through Apport, and the developers ask you to attach information from your system.
OPTIONS
Please see the apport-cli(1) manpage for possible options.
ENVIRONMENT
APPORT_IGNORE_OBSOLETE_PACKAGES
Apport refuses to create bug reports if the package or any dependency is not current. If this environment variable is set, this
check is waived. Experts who will thoroughly check the situation before filing a bug report can define this in their ~/.bashrc or
temporarily on the command line when calling apport-bug.
SEE ALSO apport-cli(1)AUTHOR
apport and the accompanying tools are developed by Martin Pitt <martin.pitt@ubuntu.com>.
Martin Pitt September 08, 2009 apport-bug(1)