![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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 . |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Hi!
What flavor of UNIX are you using? See the man pages on the native system on tar Regards SHAIK |
|
#3
|
|||
|
|||
|
no the manual not say about this problem
the environment is SCO UNIX
|
|
#4
|
|||
|
|||
|
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 |
|
#5
|
|||
|
|||
|
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? |
|
#6
|
|||
|
|||
|
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 |
|||
| Google The UNIX and Linux Forums |