Finding version of firefox in directory


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Finding version of firefox in directory
# 1  
Old 02-08-2017
Finding version of firefox in directory

I have a unique situation, I have a RHEL OS but also a file path that has a OS image (it is not the image running on the machine) if I run fire fox -version it will give me the version of the actively installed FF however I need to know if the version of FF sitting in the non active path is the same version of the one installed. Any ideas?
# 2  
Old 02-08-2017
I suppose with hindsight you could have installed them in appropriate directories with the version number as part of the path, but if the firefox executable has to be in your PATH, try changing your PATH to the required 'inactive' directory and running the same. Does that help?

Alternatively, you might be able to force the command like this:-
Code:
/path/to/unknown/firefox -version


Does that help?

Robin
# 3  
Old 02-08-2017
Quote:
Originally Posted by rbatte1
I suppose with hindsight you could have installed them in appropriate directories with the version number as part of the path, but if the firefox executable has to be in your PATH, try changing your PATH to the required 'inactive' directory and running the same. Does that help?

Alternatively, you might be able to force the command like this:-
Code:
/path/to/unknown/firefox -version

Does that help?

Robin
I took this responsibility from someone else because we don't think it was being mirrored correctly. Maybe some more details will help. I have a machine that I install updates or new applications and test to ensure it is secure and the software still works. Whenever I have the thumbs up to move it over to the other network, I make a tarball of the not active OS path and untar the overlay of the OS to the new machine on the other network. So that it can be tested with out software.

I know I could just take this over add the overlay of the OS and then do -version however, I have restrictions on what I can and cannot take over there without proper authority. Is there a file that I can look into to see version numbers? I did find compatibility.ini but that only tells me last version compatible.
# 4  
Old 02-10-2017
Hi,

This is a bit of an oddball suggestion to say the least, but if you have a full proper install of Firefox that came from a package or repo somewhere, you might well have the changelog to look at. For example, on my own system (which is admittedly Ubuntu rather than RHEL/CentOS, but it's the only box I have Firefox installed on) I could do something like this:

Code:
zcat /usr/share/doc/firefox/changelog.Debian.gz | head -1 | awk '{print $2}' | sed s/[\(\)]//g

which returns:

Code:
51.0.1+build2-0ubuntu0.16.04.2

So if you have the changelog, you can look at the first line and strip out the version number, basically.

Other than that, if it was installed from a package you could query the rpm database directly, but since it seems you only have access to the files and not a running copy of the other OS build that might not be feasible. If it was installed properly via yum/rpm in the other OS though you could look at the yum.log or something similar, and strip out the version number that way maybe.
# 5  
Old 02-10-2017
Interesting suggestion. awk is a lot more functional than cut fyi, you can replace all the kitchen | sink | commands with one awk.
Code:
zcat file.gz | awk '{ gsub(/[\(\)]/, ""); print $2 ; exit }'

This User Gave Thanks to Corona688 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Copy a file from directroy/ prior version to the directory/ new version

How to copy a file from directroy/ prior version to the directory/ new version automatically. (4 Replies)
Discussion started by: roy1912
4 Replies

2. UNIX for Dummies Questions & Answers

Firefox version

Hello, I'm trying to find the version of Firefox that is on my server. Normally I do this. > firefox -version Mozilla Firefox 10.0.7 The issue is that this version of Firefox, is Firefox ESR 10.0.7. I need to be able to see, from the command line, the version of Firefox and if it is a ESR... (8 Replies)
Discussion started by: bitlord
8 Replies

3. Solaris

Finding the NIC driver version on Solaris 11

In Solaris 10 it was easy, a simple grep through modinfo output and you'd have the version of any loaded module, including your NIC drivers. In my career I've seen many people relying on this information in their scripts. Now I'm on Solaris 11, and where have the version numbers gone? The... (0 Replies)
Discussion started by: cambridge
0 Replies

4. UNIX for Advanced & Expert Users

Help with finding the right version

Hi, This is real nube like. I want to gt back to some C programming in Unix using an old Armada E500 using Unix V release 4. I've been away from programming and working with Unix for many years, but would like to get into it again. I have a couple of good reference books. If someone could... (3 Replies)
Discussion started by: StashO
3 Replies

5. Web Development

Finding which firefox thread is misbehaving

Hello, I am trying to find out how to determine which firefox thread is connected to what site. Using: top -H shows the threads but not what they are connected to. The purpose of this is that some sites run nasty cpu eating programs and trying to figure out which ones. Thanks, mgb (1 Reply)
Discussion started by: mgb
1 Replies

6. UNIX Desktop Questions & Answers

Finding USB version on command line

Would anyone happen to know what to grep for finding the version of the USB ports are on the system through the command line? Thanks. (1 Reply)
Discussion started by: eightysix
1 Replies

7. UNIX for Dummies Questions & Answers

Finding file version info

Hi, Is there a standard command for retrieving the version of any given file (assuming the file has a version)? Thanks in advance Dave :) (1 Reply)
Discussion started by: davewg
1 Replies

8. UNIX for Dummies Questions & Answers

Need Shell script for getting Firefox Browser Version

Hi, How to write a script for finding out firefox version in our linux machine? Could you please share the same? I am using Red Hat Linux machine. Thanks, Kammy (2 Replies)
Discussion started by: kjannu
2 Replies

9. Shell Programming and Scripting

Shell Command for finding out Firefox version

Hi I need a shell command for finding out Firefox browser verion on linux machine. Waiting for your reply. Thanks and Regards, Kammy. (0 Replies)
Discussion started by: kjannu
0 Replies
Login or Register to Ask a Question