03-02-2011
ftp and sftp do not offer things like if/then/else and so on.
You would have to connect with ftp/sftp, get the list, hand it over to shell script logic, decide what to get or not and issue ftp/sftp again.
Since you are using sftp, you might want to scp instead to write more compact commands than ftp syntax.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hey,
I was wondering if its possible to use a complete path and file name using the mget command example
mget /dir1/dir2/dir3/file.ext
or
get /dir1/dir2/dir3/file.ext
because whenever i try its says file not found or permission denied.....
but if i do
cd dir1
cd dir2
cd dir3
mget... (2 Replies)
Discussion started by: Ganondorf
2 Replies
2. UNIX for Dummies Questions & Answers
hi, i want to mget a directory.
how to specify the flag that i dont want the system to prompt me?
thanks (2 Replies)
Discussion started by: yls177
2 Replies
3. Shell Programming and Scripting
Hi All,
I am using a csh ftp to get all the relevant files i need.
When i reduce the number of file to 4 (which is aaa,bbb,ccc,ddd), the script manage to get all the files i need. But when i add "eee" to the mget command, it doesn;t seem to get any files at all.
Is there a limit to how many... (0 Replies)
Discussion started by: Raynon
0 Replies
4. Shell Programming and Scripting
Hi All,
I am using mget (mget server.*) through ftp... ... i dont want to overwrite the files in my localmachine if it is already exists... is it possible through ftp ?? any other optios also mos t welcome
Thnks in advance (4 Replies)
Discussion started by: scorpio
4 Replies
5. UNIX for Advanced & Expert Users
Hi,
I am using mget ftp command to pull a bunch of zip files from Windows to local unix machines. It is working fine as follows.
-rw------- 1 autosys autosys 614 Aug 19 13:13 02034128.zip
-rw------- 1 autosys autosys 1866 Aug 19 13:13 02034127.zip
-rw------- 1 autosys autosys 14592 Aug 19... (1 Reply)
Discussion started by: spatra
1 Replies
6. Shell Programming and Scripting
Hi,
I am using mget ftp command to pull a bunch of zip files from Windows to local unix machines. It is working fine as follows.
-rw------- 1 autosys autosys 614 Aug 19 13:13 02034128.zip
-rw------- 1 autosys autosys 1866 Aug 19 13:13 02034127.zip
-rw------- 1 autosys ... (1 Reply)
Discussion started by: spatra
1 Replies
7. UNIX for Dummies Questions & Answers
Hi
I am trying to get 3 files sitting on a FTP server to an application server.
All 3 files are .csv files. I am using mget *.csv and it transfers only 2 files.
the 3 files contain a common word in their file names "Report". I tried
mget *Report*.csv and that gets me 2 files as well.
... (3 Replies)
Discussion started by: bobsn
3 Replies
8. Shell Programming and Scripting
Hi,
I am facing an issue with mget command, below are the details
The following commands are in a batch file "abc.ctl"
cd /mypath/mydirectory/
mget 'MYFILE_*.touch'
bye
I use this file as a parameter for an sftp command
sftp -b abc.ctl -oIdentityFile=$myserver -oPort=$myport >>... (0 Replies)
Discussion started by: saurabh_mh
0 Replies
9. UNIX for Dummies Questions & Answers
Hi I'm trying to get all files from a directory with a script. So i'm gone paste my script here:
cd /var/www/match_demos/speedgaming/
lftp -u Gudfaren,xxxxx ftp.speedgaming.pro -e cd 89.221.243.11_27500 -e mget *.dem
exit
when i run that i get:
"File name missed. Try `help mget' for more... (2 Replies)
Discussion started by: vYN
2 Replies
10. Shell Programming and Scripting
hi,
i am using ftp command to get some files from a remote server.
if the remote server contains files of different extension.
abc.txt
def.txt
ghi.lst
jkl.cnf
is it possible to get all the three type of files in one ftp?
i am using this ftp command
$FTP $Remote_server <<_FTP1
... (4 Replies)
Discussion started by: Little
4 Replies
LEARN ABOUT ULTRIX
sftp-server
sftp-server(1M) System Administration Commands sftp-server(1M)
NAME
sftp-server - SFTP server subsystem
SYNOPSIS
/usr/lib/ssh/sftp-server
DESCRIPTION
sftp-server implements the server side of the SSH File Transfer Protocol as defined in the IETF draft-ietf-secsh-filexfer.
sftp-server is a subsystem for sshd(1M) and must not be run directly. There are no options or config settings.
To enable the sftp-server subsystem for sshd add the following to /etc/ssh/sshd_config:
Subsystem sftp /usr/lib/ssh/sftp-server
See sshd_config(4) for a description of the format and contents of that file.
There is no relationship between the protocol used by sftp-server and the FTP protocol (RFC 959) provided by in.ftpd.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
FILES
/usr/lib/sftp-server
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWsshdu |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
SEE ALSO
sftp(1), ssh(1), ssh-add(1), ssh-keygen(1), sshd(1M), sshd_config(4), attributes(5)
To view license terms, attribution, and copyright for OpenSSH, the default path is /var/sadm/pkg/SUNWsshdr/install/copyright. If the
Solaris operating environment has been installed anywhere other than the default, modify the given path to access the file at the installed
location.
AUTHOR
Markus Friedl
SunOS 5.10 30 Jul 2003 sftp-server(1M)