DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 564DZVgs1047086 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 564DZVgs1047086 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=fxdYRED1 X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 28C863851416 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1751636129; bh=+t0iOqeZp5aJ2nKVjKAgS8JKwXcw2aVML0oVYvIPw4Q=; h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=fxdYRED1VIiL0GwVwboLa97AdSKIJXDmfzLStqx6J+Q48yOnibI5KvYKhzCafdBgF xcgRZiSUumOXu8DUtw9He2+Bk650MG8Yy3DmYl653AZtxr6onHFbOotd4N6VGbnAd5 Rk5ZNCFfvFW6rQhlPWzcImCOfihz28h2YLKzH9Ss= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7A8EB38515D2 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7A8EB38515D2 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1751636104; cv=none; b=qwuiRHvPa9h6Pk+wOPW+VV4SiT/vZvkdP+sg0k3QQDMwfoTKvOimlI3Mu4MoaG5UHY5rPJvEsIb2wFufnZC2xSWIF+KcbAwDfRIARFZXg0DBJY2BFB5dq+4InvEgXBjScepIB6sIbeakEqdx+BLEnTXZiVtmbXor8Rplxcwqwgo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1751636104; c=relaxed/simple; bh=S29YPdPHiehGV8aZ3sRdU9M9uxrllnCZgO8hVKb2v5M=; h=DKIM-Signature:Date:From:Message-ID:To:Subject:MIME-Version; b=vjzFTXVELQ7jL4D5LRgq+bnOHGDlVRhOuNBxUQJ6okVF+6KxlO65VZR2b9xiQAnoXY/OFBLUUmxLg7qSRscC9g8YJQXvrkHmHHNFPDwV0VlgQfA0LvHWMNs+3q+hrGw6Kj+hpZqYIijxVSCkRF8JcUQ1lriS6x10fpwMtnm9lZ8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7A8EB38515D2 X-Yandex-Fwd: 1 Date: Fri, 4 Jul 2025 16:22:26 +0300 X-Mailer: The Bat! (v9.3.4) Professional Message-ID: <664916394.20250704162226@yandex.ru> To: Fergus Daly , cygwin AT cygwin DOT com Subject: Re: Misleading (irritating) output from cp In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Andrey Repin via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Andrey Repin Content-Type: text/plain; charset="iso-8859-1" Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id 564DZVgs1047086 Greetings, Fergus Daly! > If you try > $ cp -v existingfile existingdirectory > you get feedback > 'existingfile' -> 'existingdirectory/existingfile' > which is just fine. (Omitting the switch -v silences the feedback: also fine.) > Whereas: if you try > $ cp -v existingfile nonexistingdirectory > you get feedback (two lines) > 'existingfile' -> 'nonexistingdirectory' > /bin/cp: cannot create regular file: No such file or directory > of which the 2nd line is useful advice but the 1st line is just a bit > misleading / irritating / .. difficult to ignore .. whatever. > (Try the same / similar thing with any other command e.g. rm e.g. md5sum > and you just get the 2nd line advice.) > Try > $ cp -v existingfile nonexistingdirectory 2> /dev/null > then you suppress line 2 as required; but you still get line 1 which now is > _very_ misleading / _very_ irritating! > This "feature" is matched in Linux. > Maybe a small thing but not to me. (Where it occurs it rather screws up the smooth evolution of session logs.) > Does anybody know of a way of suppressing the 1st line feedback? If you know for a fact that the destination directory may not exist, you should use `install` instead of `cp`. It provides greater control over a file/directory creation. -- With best regards, Andrey Repin Friday, July 4, 2025 16:21:14 Sorry for my terrible english... -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple