Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Program: How to FTP logs from a Server to Desktop Post 302580600 by rymnd_12345 on Friday 9th of December 2011 02:29:17 AM
Old 12-09-2011
Program: How to FTP logs from a Server to Desktop

Hi guys,

Good day! Anyone there could suggest on how can I create a program that will get (ftp) the logs I need from a remote Server (running in Linux) into my Desktop (running in Windows 7). For Perl program suggestions, FYI that I'm using Active Perl version. The reason why I need this one is that I want to run the program that has been created not on the remote server but in the Desktop itself so not to affect the remote Server.

I've tried these simple codes below:

Code:
#!usr/bin/perl

$connect = "ftp <IP>";
system ($connect);

$user = <STDIN>;
chomp $user;
$pass = <STDIN>;
chomp $pass;

if ($user eq /<correct user>/ && $pass eq /<correct pass>/)
{
    $logs_dir = "cd <dir>/";
    system ($logs_dir);
}

it only works for the FTP part and just like an ordinary FTP command it did not save the input user and pass into the variables and nothing else happens.

Please help!

Br,
rymnd_12345

Last edited by methyl; 12-09-2011 at 06:29 AM.. Reason: please use code tags
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to get return value from C program and logs to file

Hi, I have written scritp which prints output from the executable to standard output as well as in a file. Here "add" is an c executable which returns some value based on inputs. But if tee is not used "$?" returns the return value from add exe. If tee is used it is simply retuning 0. echo... (5 Replies)
Discussion started by: yhacks
5 Replies

2. UNIX for Dummies Questions & Answers

FTP Logs in Unix

Hi. Is there a way or command (other than netstat) in Unix to find out or get a list a users who FTP into a particular server? Like, say last 1000 users. I need to get the user ID (any info), who FTP to a particular server. netstat gives only the users who have an FTp session currently. ... (2 Replies)
Discussion started by: manisendhil
2 Replies

3. Shell Programming and Scripting

Help loading a program into perl from a file on desktop

So I want to use this program that I have downloaded from: PaGE - Patters from Gene Expression However, I am not sure how to actually get in to and run the program... I can log into the server, and was assuming I needed to get the "PaGE_5.1.6.pl" file into a folder some how, but not sure how to... (2 Replies)
Discussion started by: silkiechicken
2 Replies

4. UNIX for Advanced & Expert Users

FTP Logs in Unix

Hi. Is there a way or command (other than netstat) in Unix to find out or get a list a users who FTP into a particular server? Like, say last 1000 users. I need to get the user ID (any info), who FTP to a particular server. netstat gives only the users who have an FTp session currently. ... (4 Replies)
Discussion started by: manisendhil
4 Replies

5. Shell Programming and Scripting

Upload files from desktop to unix through FTP

Hi , I want to upload some files from my desktop to unix server through FTP . The list of files are in a text file .Please suggest how to do it through scrip . Thanks in advance .. Anupam (8 Replies)
Discussion started by: anupamhalder
8 Replies

6. Shell Programming and Scripting

Capturing FTP logs

Hi Guys, I am trying to capture the FTP Logs in a log file. I am using the below code. ftp -d -n -v $Remote_Host << EOD > $Ftp_LOG; Since iam running the script in debug mode, i am able to see that the ftp is done and the file has been transferred. But the log file does not have... (7 Replies)
Discussion started by: mac4rfree
7 Replies

7. UNIX and Linux Applications

Need a FTP SERVER Program FREE

I need a FTP SERVER program for using in ubuntu, Do you know any for free? ps: there will be no internet connection so, vsftp will not work. need a tool (like filezilla but filezilla has no server version for unix ubuntu) that has to be installation package to extract in it. (6 Replies)
Discussion started by: F@NTOM
6 Replies

8. Red Hat

Implement FTP server on RHEL server without using FTP client

We have RHEL 5.8 in our environment, I had a query whether we can implement an FTP server using vsftpd package and Linux configurations like setsebool without using any external FTP clients like FileZilla etc. I am very confused on this. The FTP functionalities that should be present are download &... (3 Replies)
Discussion started by: RHCE
3 Replies

9. UNIX for Beginners Questions & Answers

How to see the status of all the ftp put & get files logs and curent ftp transfer status ?

How to see the status of all the ftp put & get files logs and curent ftp transfer status if any active ftp running in the background ? (2 Replies)
Discussion started by: i4ismail
2 Replies
GFTP(1) 						      General Commands Manual							   GFTP(1)

NAME
gftp - a graphical ftp client SYNOPSIS
gftp [options] [[proto://][ user : [pass] @] site [: port ][/ directory ]] DESCRIPTION
gFTP is a multiprotocol file transfer program for X Windows and the console. It features support for the FTP, SSH, HTTP, and local file system protocols, simultaneous downloads, resuming of interrupted file transfers, file transfer queues, downloading of entire directores, ftp and http proxy support, remote directory caching, bookmarks menu, stop button and many more features OPTIONS
You may enter a url on the command line that gFTP will automatically connect to when it starts up. --help, -h Display program usage, and quit --version, -v This will display the current version of gFTP, and exit --download, -d This tells gFTP to download the files and directories specified in the url passed on the command line. user This is the username that you will login as to the remote site. If no username is supplied, the default is to login as anonymous. pass This is the password you will use to login to the remotesite. If you do not enter a password, then gFTP will ask you for one when it starts up. I do not recommend entering your password on the command prompt. Anyone that has access to your machine will be able to see your username and password with the ps(1) command. If you are logging in as anonymous, you do not need to pass a password since gFTP will automatically send your email address as your password. site This is the remote site you want to connect to port This is the port that the remote server is listening on. If you do not enter a port, it will default to using the ftp port listed in the services(5) file. If the entry doesn't exist there, it will default to port 21. directory This is the default directory to change to once you are connected to the remote server. FILES
~/.gftp/gftprc Per user configuration file. This file is commented very well, so that is why there isn't a manpage for it. Most of the options in here can be set inside gFTP itself. BUGS
If you find any bugs in gFTP, please report them directly to the author. AUTHOR
Brian Masney <masneyb@gftp.org> - http://www.gftp.org/ FEBURARY 2001 GFTP(1)
All times are GMT -4. The time now is 05:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy