X-Recipient: archive-cygwin@delorie.com X-SWARE-Spam-Status: Yes, hits=6.2 required=5.0 tests=AWL,BAYES_50,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_DYNAMIC,KHOP_THREADED,RDNS_DYNAMIC,SARE_FREE_WEBM_CZSEZNA,SPF_NEUTRAL,TW_SV X-Spam-Check-By: sourceware.org Message-ID: <50D0E08B.6000907@seznam.cz> Date: Tue, 18 Dec 2012 22:30:51 +0100 From: "V.99" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Error invoking find as a ssh command References: <50D0DCAF.6010608@seznam.cz> In-Reply-To: <50D0DCAF.6010608@seznam.cz> X-Forwarded-Message-Id: <50D0DCAF.6010608@seznam.cz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CoopexSoftPB-MailScanner-Information: Please contact the ISP for more information X-CoopexSoftPB-MailScanner-ID: BFE0FA194A.A021C X-CoopexSoftPB-MailScanner: Found to be clean X-CoopexSoftPB-MailScanner-From: v.99@seznam.cz Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Delivered-To: mailing list cygwin@cygwin.com Hi, I cannot invoke find as command of ssh (ssh login@machine find params), but invoking find with same params from terminal works correctly. Maybe a bug in find utility? Details and problem demonstration: ---------------------------------- I'm working on CentOS, connecting to Windows Server 2008 Standard 32-bit, Service Pack 2. [root@backup domain_backup]# cat /etc/redhat-release CentOS release 6.3 (Final) [root@backup domain_backup]# ssh bkp@builder Last login: Mon Dec 17 10:50:49 2012 from bdc bkp@builder ~ $ /cygdrive/c/Windows/system32/cmd.exe /C ver Microsoft Windows [Version 6.0.6002] bkp@builder ~ $ logout Connection to builder closed. [root@backup domain_backup]# I need to get list of files and their sizes: [root@backup domain_backup]# ssh bkp@builder find /cygdrive/d/Backups/Data -printf "\"%f (%s)\n\"" FIND: Invalid switch [root@backup domain_backup]# The problem is not in -printf parameter, because [root@backup domain_backup]# ssh bkp@builder find /cygdrive/d/Backups/Data FIND: Invalid switch [root@backup domain_backup]# works not too. The same find invoked in terminal works: [root@backup domain_backup]# ssh bkp@builder Last login: Mon Dec 17 11:16:57 2012 from bdc bkp@builder ~ $ find /cygdrive/d/Backups/Data -printf "%f (%s)\n" | head -n 2 Data (0) BKP-builder-20120803-2359-mssql-EmpMonitor.7z (535069) bkp@builder ~ $ logout Connection to builder closed. [root@backup domain_backup]# Invoking other command in place of find works: [root@backup domain_backup]# ssh bkp@builder ls /cygdrive/d/Backups/Data | head -n 2 BKP-builder-20120803-2359-mssql-EmpMonitor.7z BKP-builder-20120803-2359-mssql-EmpMonitor.7z.sha [root@backup domain_backup]# Invoking find on no-cygwin machine works too: [root@backup domain_backup]# ssh root@www find /opt/backup/pool/ -printf "\"%f (%s)\n\"" | head -n 2 pool/ (94208) BKP-www-20121210-0033-svn-Rpt-14.tar.bz2 (2062406) [root@backup domain_backup]# Versions information -------------------- Cygwin.dll 1.7.17-1 find utility find (GNU findutils) 4.5.9 Packaged by Cygwin (4.5.9-2) Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Eric B. Decker, James Youngman, and Kevin Dalley. Built using GNU gnulib version 1778ee9e7d0e150a37db66a0e51c1a56755aab4f Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS(FTS_CWDFD) CBO(level=2) sshd OpenSSH_6.1p1, OpenSSL 1.0.1c 10 May 2012 Cheers, Vlado P.S.: I sent this message Mon, 17 Dec 2012 11:46:56 +0100, but seems not delivered :-( -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple