The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
rename a lot of files again ajp7701 Shell Programming and Scripting 11 03-31-2008 04:36 PM
rename files help piltrafa UNIX for Dummies Questions & Answers 2 10-04-2007 06:47 AM
trying to rename the files in dir hankooknara Shell Programming and Scripting 8 07-02-2007 12:36 AM
rename many files fsmadi SUN Solaris 4 04-30-2007 08:27 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #8  
Old 05-14-2002
Registered User
 

Join Date: May 2002
Location: NL
Posts: 5
OS: unix, version unknown (any way to write it to a file??)
cannot telnet to the server, only got shell access via cgi/pl
__________________
got msn @ msn1@CompuTel-Systems.com

email to unix.com@CompuTel-Systems.com
Forum Sponsor
  #9  
Old 05-14-2002
annececile's Avatar
Registered User
 

Join Date: Nov 2001
Location: Paris, France
Posts: 42
To have the UNIX version, you can try in perl script:
system "uname -a > ver";
ver is the file in which you will have the version.
If this don't work, I think you have a problem with the system shell ( maybe you don't have the good path or rights define).
Do you try other system command like cp, touch , ... ?
  #10  
Old 05-14-2002
Registered User
 

Join Date: May 2002
Location: NL
Posts: 5
it say's "Linux server.name.com 2.4.16 #1 SMP Thu Nov 29 15:43:24 CET 2001 i686 unknown"

this is my code used to get the file;

#!/usr/local/bin/perl
#/var/log/apache/site/www.computel.com_log
#/var/log/apache/site/user.2y.net_log
print ("Content-type: text/html\n\n");
print ("Bezig met log-file.<hr>Kopie maken...");
system("cp /var/log/apache/sites/www.computel.com_log /nfs/home/computel/logs");
print ("<br>chmod...");
system("chmod 777 /nfs/home/computel/logs/www.computel.com_log");
print ("<br>gzip...");
system("gzip -cfq9 /nfs/home/computel/logs/www.computel.com_log > /nfs/home/computel/logs/www.computel.com_log.gz");
print ("<br>verwijderen oude log...");
system("rm -r /nfs/home/computel/logs/www.computel.com_log");
print ("<br>chmod...");
system("chmod 777 /nfs/home/computel/logs/www.computel.com_log.gz");
print ("<br>Hernoem...");

# Have to rename it to log_'datetime'.gz

system "mv /nfs/home/computel/logs/www.computel.com_log.gz /nfs/home/computel/logs/log.gz";
print ("<br>Klaar.");
exit;
__________________
got msn @ msn1@CompuTel-Systems.com

email to unix.com@CompuTel-Systems.com

Last edited by CompuTelSystem; 05-14-2002 at 12:35 AM.
Google The UNIX and Linux Forums
Closed Thread

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:22 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0