Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-27-2006, 01:36 AM   #1
LQ Newbie
Registered: Jan 2006
Posts: 4

Rep: Reputation: 0
Log File with Mput size

Hello please see my below code and help how to get the log file with the details of mput files also with size? now iam getting the connection begintime and end time

# **Autoftp**. Generated by menon
# Configures a new ~/.netrc
rm $HOME/.netrc
echo ***********
echo ***********
echo ***********
chmod **********
echo test log file > autoftp.log
echo Begin conection at: >> autoftp.log
date >> autoftp.log
ftp -i<<**
mput file1 file2

echo End conection at: >> autoftp.log
date >> autoftp.log
# End
Old 02-26-2006, 09:29 PM   #2
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
I presume you want to capture (or capture and filter) the output from your ftp session.


You've already got a "here script" ("ftp -i <<!"). All you have to do is redirect that output to a file. Or pipe it through an "awk" command to do the filtering.

ftp -i <<!
  ... some stuff
! | awk '/files/ {print "size= %d\n", $2}'
I completely made up that "awk" command, but I think it gives you the idea: the example:
1) redirects "stdin" from a "here script" (like you're already doing)
2) redirects "stdout" by piping it into awk
3) "awk" looks for some pattern (I said "files"; I have no idea if that pattern
actually occurs in your ftp output)
4) Each line matching the pattern gets processed (the made-up "print" command)

I hope that helps .. PSM


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
file system size larger than fysical size:superblock or partition table corrupt klizon Linux - General 0 06-18-2004 05:18 PM
/var/log/maillog file size vaughn Linux - Software 6 12-15-2003 06:12 PM
How to control log file size in /var/log? yan Linux - General 2 10-13-2003 06:00 PM
Limiting the size of a log file ganninu Linux - General 1 09-18-2003 09:23 AM
iptables, changing log file from /var/log/messages acid2000 Linux - Networking 3 03-11-2003 09:38 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:08 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration