Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GZIP

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi. Does anyone know how to see if I have GZIP installed on my server (like a simple test script). Thanks, Eric
 
If you have command prompt access on the server, and it is a *nix box,
Code:
prompt> which gzip <return>

If you really want it in a script (I'm not sure why you would),
Code:
#!/usr/local/bin/perl
$gz = `which gzip`;
print &quot;$gz&quot;;

Wrapped in a very simple cgi,
Code:
#!/usr/local/bin/perl
$gz = `which gzip`;
print &quot;Content-type: text/html\n\n&quot;;
print &quot;<html><head><title>g where?</title></head>\n&quot;;
print &quot;<body><p>$gz</p></body></html>\n&quot;;
'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top