The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to mount a file system of a remote machine to local file system cy163 UNIX for Dummies Questions & Answers 2 01-31-2008 06:04 AM
where can get iso of sco system v 5.05 weramirez SCO 1 01-30-2007 07:29 AM
rsh commands not getting executed from Solaris 10 System to AIX System jumadhiya SUN Solaris 25 01-22-2007 02:26 AM
Secure FTP Problem using Sun SSH on Client system F-Secure on Server system ftpguy SUN Solaris 3 01-11-2007 09:19 AM
Taking a system off a network on a system Terrible Shell Programming and Scripting 4 12-25-2006 06:49 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 12-26-2001
Registered User
 

Join Date: Dec 2001
Location: GUANGZHOU CHINA
Posts: 11
Unhappy about system

hi all
i'm in trouble now. help me please.
the program is like below:
system( "tar cvf p.tar /data" );
excute this program and the p.tar is empty .
when i run this command in command line , p.tar is right.
so why?
please tell me , thank you .
Reply With Quote
Forum Sponsor
  #2  
Old 12-26-2001
shaik786
Guest
 

Posts: n/a
Hi!

What flavor of UNIX are you using? See the man pages on the native system on tar

Regards
SHAIK
Reply With Quote
  #3  
Old 12-26-2001
Registered User
 

Join Date: Dec 2001
Location: GUANGZHOU CHINA
Posts: 11
no the manual not say about this problem

the environment is SCO UNIX
Reply With Quote
  #4  
Old 12-26-2001
shaik786
Guest
 

Posts: n/a
how about harcoding the exact path to each file in your system() command, which should look like:

system("/sbin/tar cvf /users/shaik/p.tar /data");

And notic what the prompt says when the system() is being executed.

Rgds
SHAIK
Reply With Quote
  #5  
Old 12-26-2001
Registered User
 

Join Date: Dec 2001
Location: GUANGZHOU CHINA
Posts: 11
hi, i have found a way to solve it.

yeah , i have try by that way .
but not effection.
i have found a way to solve this problem .
the modified program like bleow:

echo " #!/bin/ksh \n tar cvf p.tar /data > tar.sh";
system("tar.sh");

but i still do not know why?
Reply With Quote
  #6  
Old 12-27-2001
shaik786
Guest
 

Posts: n/a
Hi!

Good you solved the problem. Probably some other version or program called tar is getting executed. Check your $PATH variable, in one of which path, there should be another tar located.

Rgds
SHAIK
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:18 AM.


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