Sorry I’ve forgot to mention, that we’re mostly using SFTP and FTPS (FTP only in rare cases).
From: Mütze, Tilo, NMD-C4.2 Sent: Tuesday, June 10, 2014 10:41 AM To: 'Alexander Lukyanov' Cc: Lista LFTp Subject: RE: [lftp] lftp and patterns Hi Alexander, yep, we’ve already tried cls before. But regarding the exit code, it works the same as ls. Exit code are an indicator if something went wrong and with lftp you have a strong partner as you can use “||” and “&&” to combine commands and exit with a specific return code, e.g. if there is no data. So to us it makes much sense, to have a possibility in lftp to check for patterns and end ls command with an error code, if no files are found. Thanks and regards, Tilo From: Alexander Lukyanov [mailto:lavv...@gmail.com] Sent: Friday, June 06, 2014 6:00 PM To: Mütze, Tilo, NMD-C4.2 Cc: Lista LFTp Subject: Re: [lftp] lftp and patterns Which backend protocol do you use? If ftp, then ls arguments are wholly passed to server side as LIST argument. If other protocols, then most probably you may only specify a directory to list. There is another command - cls - which handles arguments locally and provides better functionality compared with plain "ls". Try it. Exit code may be not that you want though. 2014-04-15 17:27 GMT+04:00 <tilo.mue...@bertelsmann.de<mailto:tilo.mue...@bertelsmann.de>>: Hi, is it somehow possible, to list files by using a pattern like: ls *.csv dir *.csv And if no files are found, exit that ls or dir command with an exit code <> 0? Regards, Tilo _______________________________________________ lftp mailing list lftp@uniyar.ac.ru<mailto:lftp@uniyar.ac.ru> http://univ.uniyar.ac.ru/mailman/listinfo/lftp -- Alexander.
_______________________________________________ lftp mailing list lftp@uniyar.ac.ru http://univ.uniyar.ac.ru/mailman/listinfo/lftp