Sponsored Content
Top Forums UNIX for Advanced & Expert Users Sftp working on Linux but error on HP UX Post 302477075 by murtymvvs on Friday 3rd of December 2010 07:58:18 AM
Old 12-03-2010
Sftp working on Linux but error on HP UX

Hi

the below two line in my sh work fine in Linux but when I run it in HP UX it throws error saying "No such file or directory (-)."

can anyone pleas let me know what is wrong. Any help is appreciated.
Code:
INPUTFILE="$(echo ls -1t | sftp -b- $SFTPSERVER:$SFTPDIR |grep ^LK| head -1)"
echo get $INPUTFILE | sftp -b- $SFTPSERVER:$SFTPDIR | sed "s/^/$RUN_DT /g"

Thanks
MM

Last edited by vbe; 12-03-2010 at 09:46 AM.. Reason: code tags please
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

SFTP not working in cron

Hi, I have a simple script that is trying to put a file that resides on a local machine to a remote machine. It runs fine manually but does not complete when scheduling to run in cron. Here is what the script looks like. Any idea what I am doing wrong here? #!/bin/ksh cd /path sftp... (4 Replies)
Discussion started by: ewilson0265
4 Replies

2. UNIX for Dummies Questions & Answers

sftp not working as cronjob

hi, I have a script that will automatically login into a server and get a file. it is working fine if i run it on a command line. however, when i tried to run it as a cron job, it is not working. what should i do? set timeout -1 spawn /usr/bin/sftp user1@server1 match_max 100000 expect... (3 Replies)
Discussion started by: tungaw2004
3 Replies

3. Shell Programming and Scripting

Automate SFTP is not working

Hi All:cool:, i tried to automate SFTP process after passwordless authendication. Stil i am getting error... Can anyone help.... ------------------- sample code below ------------------- sftp -v $mdskk@100.4.4.75 << EOF cd /data mget *.tar.gz bye EOF... (2 Replies)
Discussion started by: senthil_seera
2 Replies

4. UNIX for Advanced & Expert Users

SFTP not working in the background

I'm modifying some code to SFTP files because the remote servername and user are changing. The keys have been correctly installed and I'm using the -B option to automate the actions following connection e.g. cd, put etc. This is all working nicely. However, when I wrap this up to call it from a... (0 Replies)
Discussion started by: JerryHone
0 Replies

5. UNIX for Advanced & Expert Users

SFTP Not Working With CRON

Hello - I have a production stream that is scheduled with cron to run each Monday morning. The jobs in the stream perform tasks including FTP get, load to a DB table, and report processing. About a month ago I was directed to begin using sftp in these jobs and since then the jobs... (12 Replies)
Discussion started by: PatrickPurfield
12 Replies

6. Shell Programming and Scripting

SFTP-how to log individual sftp command error while executing shell script

Hi, I have situation where i need to automate transferring 10000+ files using sftp. while read line do if ; then echo "-mput /home/student/Desktop/folder/$line/* /cygdrive/e/folder/$line/">>sftpCommand.txt fi done< files.txt sftp -b sftpCommand.txt stu@192.168.2.1 The above... (1 Reply)
Discussion started by: noobrobot
1 Replies

7. Solaris

Why is sftp working but ftp not

I am not very familiar with the use of FTP, and trying to run it I found out that standard "ftp" is not working" but "sftp" is. If sftp is allowed will that block ftp ? and if so where is this set ? I thought there is no relationship, is that right ? If so look here: inetadm | grep ftp enabled... (11 Replies)
Discussion started by: manni2
11 Replies

8. UNIX for Advanced & Expert Users

secure sftp login not working in RedHat Linux

I'm using RedHat Linux 6.1 and wanted to create an user account with only access to single directory. Have followed all the steps from below link and still user is not able to login: How to Setup Chroot SFTP in Linux (Allow Only SFTP, not SSH) (link removed) While the other users, which... (10 Replies)
Discussion started by: asyed
10 Replies

9. Linux

Put -r is not working in SFTP

Hi Folks, I am trying to copy a directory along with sub-directories to SFTP server. I have connected to SFTP and tried to run the below command: sftp> get -r abc/* It is throwing the error Invalid flag -r Can you please let me know the ways to copy a directory from Local to SFTP ... (1 Reply)
Discussion started by: kirans.229
1 Replies

10. Shell Programming and Scripting

Mget with SFTP is not working

hi Team, I am connecting from one (A) linux server to another(C)/any linux server by sftp on A linux server: sftp userid@C password: mget is Not working fine I am using mget to pull the files. it shows mget as invalid command. But from (B) Linux server to (C) /to Any server Linux... (15 Replies)
Discussion started by: johnsnow
15 Replies
MKNODAT(2)						     Linux Programmer's Manual							MKNODAT(2)

NAME
mknodat - create a special or ordinary file relative to a directory file descriptor SYNOPSIS
#include <fcntl.h> /* Definition of AT_* constants */ #include <sys/stat.h> int mknodat(int dirfd, const char *pathname, mode_t mode, dev_t dev); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): mknodat(): Since glibc 2.10:cw _XOPEN_SOURCE >= 700 Before glibc 2.10: _ATFILE_SOURCE DESCRIPTION
The mknodat() system call operates in exactly the same way as mknod(2), except for the differences described in this manual page. If the pathname given in pathname is relative, then it is interpreted relative to the directory referred to by the file descriptor dirfd (rather than relative to the current working directory of the calling process, as is done by mknod(2) for a relative pathname). If pathname is relative and dirfd is the special value AT_FDCWD, then pathname is interpreted relative to the current working directory of the calling process (like mknod(2)). If pathname is absolute, then dirfd is ignored. RETURN VALUE
On success, mknodat() returns 0. On error, -1 is returned and errno is set to indicate the error. ERRORS
The same errors that occur for mknod(2) can also occur for mknodat(). The following additional errors can occur for mknodat(): EBADF dirfd is not a valid file descriptor. ENOTDIR pathname is relative and dirfd is a file descriptor referring to a file other than a directory. VERSIONS
mknodat() was added to Linux in kernel 2.6.16. CONFORMING TO
POSIX.1-2008. NOTES
See openat(2) for an explanation of the need for mknodat(). SEE ALSO
mknod(2), openat(2), path_resolution(7) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2010-09-20 MKNODAT(2)
All times are GMT -4. The time now is 12:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy