Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

libssh2_sftp_mkdir_ex(3) [debian man page]

libssh2_sftp_mkdir_ex(3)					  libssh2 manual					  libssh2_sftp_mkdir_ex(3)

NAME
libssh2_sftp_mkdir_ex - create a directory on the remote file system SYNOPSIS
#include <libssh2.h> #include <libssh2_sftp.h> int libssh2_sftp_mkdir_ex(LIBSSH2_SFTP *sftp, const char *path, unsigned int path_len, long mode); int libssh2_sftp_mkdir(LIBSSH2_SFTP *sftp, const char *path, long mode); DESCRIPTION
sftp - SFTP instance as returned by libssh2_sftp_init(3) path - full path of the new directory to create. Note that the new directory's parents must all exist priot to making this call. path_len - length of the full path of the new directory to create. mode - directory creation mode (e.g. 0755). Create a directory on the remote file system. RETURN VALUE
Return 0 on success or negative on failure. LIBSSH2_ERROR_EAGAIN when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. ERRORS
LIBSSH2_ERROR_ALLOC - An internal memory allocation call failed. LIBSSH2_ERROR_SOCKET_SEND - Unable to send data on socket. LIBSSH2_ERROR_SOCKET_TIMEOUT - LIBSSH2_ERROR_SFTP_PROTOCOL - An invalid SFTP protocol response was received on the socket, or an SFTP operation caused an errorcode to be returned by the server. SEE ALSO
libssh2_sftp_open_ex(3) libssh2 0.15 1 Jun 2007 libssh2_sftp_mkdir_ex(3)

Check Out this Related Man Page

libssh2_sftp_rename_ex(3)					  libssh2 manual					 libssh2_sftp_rename_ex(3)

NAME
libssh2_sftp_rename_ex - rename an SFTP file SYNOPSIS
#include <libssh2.h> #include <libssh2_sftp.h> int libssh2_sftp_rename_ex(LIBSSH2_SFTP *sftp, const char *source_filename, unsigned int source_filename_len, const char *dest_filename, unsigned int dest_filename_len, long flags); int libssh2_sftp_rename_ex(LIBSSH2_SFTP *sftp, const char *source_filename, const char *dest_filename); DESCRIPTION
sftp - SFTP instance as returned by libssh2_sftp_init(3) sourcefile - Path and name of the existing filesystem entry sourcefile_len - Length of the path and name of the existing filesystem entry destfile - Path and name of the target filesystem entry destfile_len - Length of the path and name of the target filesystem entry flags - Bitmask flags made up of LIBSSH2_SFTP_RENAME_* constants. Rename a filesystem object on the remote filesystem. The semantics of this command typically include the ability to move a filsystem object between folders and/or filesystem mounts. If the LIBSSH2_SFTP_RENAME_OVERWRITE flag is not set and the destfile entry already exists, the operation will fail. Use of the other two flags indicate a preference (but not a requirement) for the remote end to perform an atomic rename operation and/or using native system calls when possible. RETURN VALUE
Return 0 on success or negative on failure. It returns LIBSSH2_ERROR_EAGAIN when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. ERRORS
LIBSSH2_ERROR_ALLOC - An internal memory allocation call failed. LIBSSH2_ERROR_SOCKET_SEND - Unable to send data on socket. LIBSSH2_ERROR_SOCKET_TIMEOUT - LIBSSH2_ERROR_SFTP_PROTOCOL - An invalid SFTP protocol response was received on the socket, or an SFTP operation caused an errorcode to be returned by the server. SEE ALSO
libssh2_sftp_init(3) libssh2 0.15 1 Jun 2007 libssh2_sftp_rename_ex(3)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Return codes

Hi, Can anyone tell me if there are return codes for SFTP? If so how would you capture them? I've tried 'man sftp' but its not particularly helpful. Many thanks Helen :confused: (4 Replies)
Discussion started by: Bab00shka
4 Replies

2. Shell Programming and Scripting

SFTP scripting - help required

Hi all, First post so go easy guys....... I've seen this asked before on some other forums but never properly/fully answered. My problem involves the automation of an SFTP script sending from F-Secure (ssh2) HP-UX, to Windows FTP server (ssh2) running VShell. We've set up SSH keys but while... (8 Replies)
Discussion started by: b0bbins
8 Replies

3. UNIX for Dummies Questions & Answers

create directory

how do i create a directory. how do check if the directory exist and it is valid? thanks (5 Replies)
Discussion started by: yang
5 Replies

4. UNIX and Linux Applications

Need the sample code for implementation of SFTP

Hi we need to implement SFTP through unix shell scripts. I have seen many posts, in which there is discussion about non-interactive,automated SFTP. Can anyone please send me the sample code for SFTP shell script. We are using SFTP to transfer the files from the host server to the target... (10 Replies)
Discussion started by: kumarm
10 Replies

5. UNIX for Dummies Questions & Answers

Listing full file names with the exact length of 3 characters

This is what I have to do: Display the full file name (including the full path) and file size of all files whose name (excluding the path) is exactly 3 characters long. This is the code I have: find / -printf "Name: %f Path: %h Size: %s (bytes)\n" 2>/dev/null | grep -E "Name: .{3,} Path" |... (7 Replies)
Discussion started by: Joesgrrrl
7 Replies

6. Windows & DOS: Issues & Discussions

How to connect SFTP(Linux) from Windows DOS

I need to write a batch script for file transfer from SFTP to Windows system. SFTP is on Linux system. I kept this code in batch file and executing it.. but not working.. Even i tried from Command prompt like this "open sftp.host.com" but getting error. Can anyone help with the code and tell me how... (15 Replies)
Discussion started by: mohantmk
15 Replies

7. Shell Programming and Scripting

SFTP script help is needed

Hello all and Happy 2010! I have following problem and I do not have a full solution yet. Maybe someone of you could help .... I have remote sevrer A and I am connecting from my local server via SFTP to download .TXT files. -Files are dropped at random times into download folder on server A... (7 Replies)
Discussion started by: kalimero
7 Replies

8. Shell Programming and Scripting

Latest file through SFTP

Hi, I want to download the latest file published on remote server using SFTP connection. The job will run at every 15 min hence should download only the latest file. The fileName will be like ABC_DDHHMISS.txt (DD- day, HH-hour, MI - Min, SS-Sec). So there will be files with same date for... (23 Replies)
Discussion started by: ssachins
23 Replies

9. Emergency UNIX and Linux Support

Unable to connect using SFTP

I shall explain the situation that I am facing to the best extent possible. I require some help, as this situation is an urgent one. I am trying to automate sending data from one AIX machine to another. A script runs that tries to push data received from an upstream application to another AIX... (7 Replies)
Discussion started by: ggayathri
7 Replies

10. Shell Programming and Scripting

Any command to delete files from source dir after SFTP copy

Hi, I am currently using SFTP 'put' command to copy all files to remote server and then delete the copied files from source directory. Can anyone help me with a single command to copy and remove files in one go? Thanks and Regards, Chetan Vyas (5 Replies)
Discussion started by: chetancrsp18
5 Replies

11. Solaris

SFTP -- Outgoing IP

Hi Gurus; I had 2 interface. eth1 : 10.x.x.x eth2 : 30.x.x.x My default out is 10.x.x.x Now, I need to connect to public SFTP Server If I use sftp user@public IP. I can not connect. because my out is 10.x.x.x But I telnet it: telnet -z 30.x.x.x <public IP - sftp server>... (5 Replies)
Discussion started by: Mujakol
5 Replies

12. Shell Programming and Scripting

Permission Denied in SFTP

Hello Guys, I am SFTPing from Solaris to Windows and accessing a softlink pointing to another server path (\\server\path). The same was working properly but I have made this connection passwordless and after that it show below error while accessing solftlink, couldn't canonicalise:... (9 Replies)
Discussion started by: Deei
9 Replies

13. Shell Programming and Scripting

File transfer using SFTP

Hi, I want to a transfer file from remote machine to a local machine using SFTP where both my local and remote machines are Ubuntu machines.So i wanted to write a unix bash script which uses SFTP command to transfer the file from remote to local machine. My remote server is 178.28.30.106. ... (14 Replies)
Discussion started by: shree11
14 Replies

14. Shell Programming and Scripting

Unable to do SFTP using expect

Hi, I am trying to sftp using expect, but not getting through as it prompt for password is coming Following is the code #/usr/bin/expect > output.log sftp medcdr@10.130.254.50 expect "password:" send "Med@Cdr12\n" expect "sftp>" send "put ZTE_*201505*\r" expect "sftp>" send "bye\r"... (7 Replies)
Discussion started by: siramitsharma
7 Replies

15. UNIX for Advanced & Expert Users

SFTP from remote server

Hi All,While sftp from remote server an error (/) is coming before the file in a script.Please find the below log. The file is on home directory on remote server. (6 Replies)
Discussion started by: kiranparsha
6 Replies