Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Ls incorrectly says file not found in sftp. Post 303012602 by pdinsdale on Tuesday 6th of February 2018 01:43:48 PM
Old 02-06-2018
Ls incorrectly says file not found in sftp.

Hi all

When I sftp to an Oracle cloud server, to a folder where there are more than 10k files, and list a small subset of files, it works OK. When I try list more than 10k files, it says file not found. Example output below.

(FYI ls/mget with 6k files works OK on this server)

Has anyone else experienced this issue before? Same issue happens with mget command. I tried setting timeout to -1 before doing the sftp.

Code:
sftp> cd /Download/promotion/polling 
 sftp> ls -l *99999.mnt 
 -rw-------    0 1001     1002          721 Oct 16 13:26  XstorePromotionExportPromotionExport-Campaign12-promotion12.FRN.99999.mnt  
 -rw-------    0 1001     1002          831 Jan 16 13:46  XstorePromotionExportPromotionExport-Campaign26-promotion26.FRN.99999.mnt  
 -rw-------    0 1001     1002         2102 Dec 14 11:05  XstorePromotionExportPromotionExport-Campaign23-promotion23.FRN.99999.mnt  
 -rw-------    0 1001     1002          837 Nov 14 11:04  XstorePromotionExportPromotionExport-Campaign13-promotion13.FRN.99999.mnt  
 -rw-------    0 1001     1002          823 Dec 21 09:43  XstorePromotionExportPromotionExport-Campaign24-promotion24.FRN.99999.mnt  
 -rw-------    0 1001     1002          775 Oct 16 13:26  XstorePromotionExportPromotionExport-Campaign11-promotion11.FRN.99999.mnt  
 -rw-------    0 1001     1002          717 Dec 21 09:54  XstorePromotionExportPromotionExport-Campaign17-promotion17.FRN.99999.mnt  
 -rw-------    0 1001     1002          725 Jan 16 13:51  XstorePromotionExportPromotionExport-Campaign28-promotion28.FRN.99999.mnt  
 -rw-------    0 1001     1002          776 Jan 18 12:43  XstorePromotionExportPromotionExport-Campaign29-promotion29.FRN.99999.mnt  
 -rw-------    0 1001     1002          832 Nov 16 10:43  XstorePromotionExportPromotionExport-Campaign14-promotion14.FRN.99999.mnt  
 -rw-------    0 1001     1002          828 Nov 30 09:17  XstorePromotionExportPromotionExport-Campaign15-promotion15.FRN.99999.mnt  
 -rw-------    0 1001     1002          761 Jan 18 15:30  XstorePromotionExportPromotionExport-Campaign30-promotion30.FRN.99999.mnt  
 -rw-------    0 1001     1002          855 Oct 13 15:56  XstorePromotionExportPromotionExport-Campaign10-promotion10.FRN.99999.mnt  
 -rw-------    0 1001     1002          721 Jan 18 12:59  XstorePromotionExportPromotionExport-Campaign31-promotion31.FRN.99999.mnt  
 -rw-------    0 1001     1002          825 Jan 16 13:48  XstorePromotionExportPromotionExport-Campaign27-promotion27.FRN.99999.mnt  
 sftp> ls -l *.mnt 
 Can't ls: "/Download/promotion/polling/*.mnt" not found 
 sftp>


Last edited by Scott; 02-06-2018 at 03:30 PM.. Reason: Please use code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Writing to a log file incorrectly

I have this script: #!/bin/ksh ######### Environment Setup ######### PATH=/gers/nurev/menu/pub/sbin:/gers/nurev/menu/pub/bin:/gers/nurev/menu/pub/mac :/gers/nurev/menu/adm/sbin:/gers/nurev/menu/adm/bin:/gers/nurev/menu/adm/mac:/ge... (5 Replies)
Discussion started by: heprox
5 Replies

2. Linux

Hostname displays incorrectly

hiii, in many of the linux machines i have tried this but the result is the same everywhere. if there are double letters in a hostname then that is displayed as single letter. e.g. if hostname is set to nepttune then login into the shell will display : NEPTUNE(admin)@/ $ hostname... (15 Replies)
Discussion started by: shamik
15 Replies

3. SuSE

scp/sftp only files which are not found.

Hi, I need to write a script to scp/sftp files from server A to server B..But i do not want to overwrite the files which already exist on server B. Anyone has a script which does the above Regards (2 Replies)
Discussion started by: SystemEng
2 Replies

4. Shell Programming and Scripting

Totals in a file - incorrectly displaying

Afternoon, I have a script which creates/modifies data into a formatted csv. The trailer record should display 2 columns, the first is a static entry of "T" to identify it as a trailer record. The 2nd is a total of amounts in a column throughout the entire file. My total isn't displaying... (8 Replies)
Discussion started by: mcclunyboy
8 Replies

5. UNIX for Dummies Questions & Answers

Strings comparing incorrectly

Hello I'm very new to Linux and shell scripting so I only know basic stuff. I'm making a script with the purpose of finding the longest string or word in a file. Here's what I got so far: #!/bin/bash longest="" for i in $(strings -n $1); do if ] then longest=$i fi done echo $longest... (4 Replies)
Discussion started by: SCB
4 Replies

6. Shell Programming and Scripting

Why sftp not found in my script

Please help I can run sftp command as following sdbs03:/a01/emm/hsup/sche/bin/dtms/si% sftp aispx02@STGISPDBS1 Connecting to STGISPDBS1... sftp> bye It seem ok, no any problem, but if I write a script and call sftp in the script, it show sftp not found error. following is my script file... (1 Reply)
Discussion started by: weyman
1 Replies

7. Fedora

sftp Unspecified GSS failure Minor code may provide more information No credentials cache found

Hi I have managed on numerous machine to set up sftp not too require a password - i finally have one that does not work and Im at a loss - looked around checked permissions etc The 2 machines Ill call then source and target I need to sftp from source to target (previously the target has... (3 Replies)
Discussion started by: wwwdaryl
3 Replies

8. UNIX for Dummies Questions & Answers

Incorrectly using 'ls' in if/then alias

I have an alias defined in which I wish to print the contents of a specific directory using 'ls' based on the if/then condition. The if/then conditions are being correctly evaluated, and the 'ls <path>' result is correct (tested directly in a terminal) although for some reason it seems the 'ls... (4 Replies)
Discussion started by: coldcoffeecup
4 Replies

9. Shell Programming and Scripting

./CARE_SM_SFTP.sh[27]: put: not found error while doing sftp

Hi, I am getting the below error while doing sftp in a script file but the same is getting executed when i run from command prompt ./CARE_SM2_SFTP.sh: put: not found Code :- sftp ${USER_ID}@${FTPHOST4}:/opt/path put <Filename with path> chmod 777 <FileName with Path>... (2 Replies)
Discussion started by: satishmallidi
2 Replies

10. Shell Programming and Scripting

Large File masking incorrectly happening Ç delimeter issue

The OS version is Red Hat Enterprise Linux Server release 6.10 I have a script to mask some columns with **** in a data file which is delimeted with Ç , I am using awk for the masking , when I try to mask a small file the awk works fine and masks the required column , but when the file is... (6 Replies)
Discussion started by: LinuxUser8092
6 Replies
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)
All times are GMT -4. The time now is 04:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy