• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 158
  • Last Modified:

ftp problem

hi all,

pls take a look at the code below.

$putfiles = "en.tar";
$socksftp="/usr/bin/ftp ";
$hostname = 'www.abc.com';
$user='xxx';
$passwd='yyy';
$directory = '/base/reports/';
`$socksftp -ni $hostname   <<!
user $user $passwd
cd $directory
bin
mput $putfiles
--------------------------
once i put my file in abc m/c, i need to untar the $putfiles file something like "tar xvf en.tar" - how do i do that?
----------------------------
quit
!`
;

Please help - urgent request ...
0
lakshminair
Asked:
lakshminair
1 Solution
 
Kim RyanIT ConsultantCommented:
If you use the Net::Telnet command, you can issue commands through a terminal seesion. You will of course need permision to untar the files remotely. You may also want to use the Net::FTP module for a cleaner interface to FTP operations.
0
 
inq123Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept a comment by teraplane

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

inq123
EE Cleanup Volunteer
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now