This time I have a question that is not a really issue because I 've already found a workaround but I don't know if the behaviour is correct or not.
In my ksh shell I open a sftp connection to a remote machine.
this is the code:
where FTP_LOG_FILE and FTP_ERR_FILE are the files (with the path) for logging.
Meanwhile the FTP_LOG_FILE has always size > 0 I expect the opposite for FTP_ERR_FILE so only if there are errors the file should have size > 0.
Unfortunately this is not true because the FTP_ERR_FILE has always size > 0. It contains n lines one for an open connection like:
Connecting to 10.129.171.80...
Connecting to 10.129.171.80...
Connecting to 10.129.171.80...
Connecting to 10.129.171.80...
Is it possible to avoid this behaviour or it's the standard?
Thanks a lot.
That may be because the sftp command is writing those lines to standard error (file descriptor 2) and not standard output (file descriptor 1). You don't see the difference (probably) while invoking sftp on the command line because for you, both standard error and standard output are the same, that is, the terminal.
Commands do this so that such messages aren't propagated to other commands in a pipeline.
Hi All,
Please hav a look at the below peice of script and let me know if there are any syntax errors.
i found that the below peice of Script is causing issue. when i use SFTP its working fine, but there is a demand to use FTP only. please find below code and explain if anything is wrong... (1 Reply)
OS: Solaris 9
Configuration /etc/syslog.conf
daemon.debug
/etc/inetd.conf
ftp stream tcp6 nowait root /usr/sbin/in.ftpd in.ftpd -A -l -d
Found the ftp.log only generate those entries from other servers/hosts.
Can we trace on all ftp entries either from/to the server?
... (6 Replies)
Hello,
I need help to check content of ftp log files. I forgot to say that I am on Solaris 9. I am using KSH.
I have 2 log files.
Here is an example of content :
LOG File from 21 October
-rw-rw-r-- 1 cvbntr xarf 94974 Nov 1 2009 TAG__SC___2006175_0.TAB
-rw-rw-r-- 1 cvbntr ... (3 Replies)
Hello,
I was wanting to know if there is any log/tracker for anonymous ftp activity for users that are logging in to our server. We migrated over to a new server and cleaning up some loose ends on the old server. We noticed that some files are being loaded on the old server via anonymous ftp.... (1 Reply)
Hi All,
I have a problem when uploading txt file from windows to Unix server.
I got 533 I/O error. I am using .bat file and it works for other batches but with this particular batch it doesn't work.
thanks guys for helping in advance. (2 Replies)
Hello All,
Below is the control card or the file which i am using in shell script to mget files from remote machine via FTP.
bash-3.00$ cat ftp_ALD_DAC.log
open 10.xx.yy.zzz
user D00000187 nb8tr4xx2u
ascii
cd prod/out
lcd /Internal_Impact_TT_Input
mget ALD*.TXT
bye
Below is the... (0 Replies)
I am trying to do the FTP using .netrc.In my .netrc file in $HOME dir i am placing the machine ip,user name and pwd.Then i am creating dynamically a file which contains the ftp commands.
My script is like below:
__________________________________
export REMOTE_DIR= <some path>
export... (4 Replies)
Hello,
I am new to unix , and I need to create a shell sciprt which helps me FTPing file from LAn to Unix box.
These files r then processed using Perl script and put in a database.
I also need to log the entire process of all the above methods in a log file in the same shell script.
Like ,... (2 Replies)
We would like to see :
who is logging in to our box via ftp and what they did when logged in.
THis would also be of value if the client ftp'ing in cannot get logged in and we'd like to look at it from our side (The ftp server side)
So ..is there logging that can be turned on or available in... (2 Replies)
Hi,
I have been trying to write a script to maintain mu ftp log as to what time did the FTP start and till what time did it work
I was unable to do it after several attempts, may be b'cos i'am new to Shell scripting.
So can anyone provide me any solutions for this problem, as it would... (1 Reply)