![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#8
|
|||
|
|||
|
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
|
||||
|
||||
|
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
|
|||
|
|||
|
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 |