From unknown Mon Aug 18 04:36:15 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#14852 <14852@debbugs.gnu.org> To: bug#14852 <14852@debbugs.gnu.org> Subject: Status: Fwd: mv fails when trying to overwrite a file in a (map) network drive Reply-To: bug#14852 <14852@debbugs.gnu.org> Date: Mon, 18 Aug 2025 11:36:15 +0000 retitle 14852 Fwd: mv fails when trying to overwrite a file in a (map) netw= ork drive reassign 14852 coreutils submitter 14852 Lluis faix=C3=B3 severity 14852 normal tag 14852 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 12 12:19:00 2013 Received: (at submit) by debbugs.gnu.org; 12 Jul 2013 16:19:01 +0000 Received: from localhost ([127.0.0.1]:50788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uxg3f-0006Er-Ov for submit@debbugs.gnu.org; Fri, 12 Jul 2013 12:19:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60496) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uxfh3-0005TR-KZ for submit@debbugs.gnu.org; Fri, 12 Jul 2013 11:55:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uxfgv-0002SQ-C4 for submit@debbugs.gnu.org; Fri, 12 Jul 2013 11:55:31 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:50321) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uxfgv-0002SD-9S for submit@debbugs.gnu.org; Fri, 12 Jul 2013 11:55:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uxfgr-0002cb-JW for bug-coreutils@gnu.org; Fri, 12 Jul 2013 11:55:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uxfgo-0002Jg-6t for bug-coreutils@gnu.org; Fri, 12 Jul 2013 11:55:25 -0400 Received: from mail-lb0-x230.google.com ([2a00:1450:4010:c04::230]:51262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uxfgn-0002JW-WA for bug-coreutils@gnu.org; Fri, 12 Jul 2013 11:55:22 -0400 Received: by mail-lb0-f176.google.com with SMTP id z5so7805090lbh.35 for ; Fri, 12 Jul 2013 08:55:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=1hsdIb85uTe/23QJgn3mQ+s49S5ovd+ew+BlZ5WM0vg=; b=Pb0guIsw54sVkE7HPLKchP1XKppELbCqh8aIXk9iNVVpPNy/ZU7D1NCDANtMflKhDQ a3lRg0qOrMOXHGB1E0uFecg+pRRVshVklYpvZ5GogE356tRKM8WhHFr5Y9ScY32+B68K 7Je3KbLHmDh0EbBG9WAykamMfsyMf27Wxqurl5zgjgX6++89w3U9A278Q0THcKkZVuJw LUDKVDHbrXXgrodelDlKmCQVlyQvEg/v3wp7hHeMA+sFOIhCtcawzMrX5CEmLaJaspE3 QFGqBoKU1p3GWVLsZwpiJl+Fuq/8k1BWTyKtsctpXbnxP4N6nngAJLHYbcAbgJ4B0dxA 7YJA== MIME-Version: 1.0 X-Received: by 10.112.132.7 with SMTP id oq7mr19592053lbb.2.1373644520916; Fri, 12 Jul 2013 08:55:20 -0700 (PDT) Received: by 10.112.7.38 with HTTP; Fri, 12 Jul 2013 08:55:20 -0700 (PDT) In-Reply-To: References: Date: Fri, 12 Jul 2013 16:55:20 +0100 Message-ID: Subject: Fwd: mv fails when trying to overwrite a file in a (map) network drive From: =?ISO-8859-1?Q?Lluis_faix=F3?= To: bug-coreutils@gnu.org Content-Type: multipart/alternative; boundary=047d7b3a81a2b78b5204e1528997 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 12 Jul 2013 12:18:57 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.3 (----) --047d7b3a81a2b78b5204e1528997 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Forgot to say I'm using minGw with Msys latest version: mingw-get-inst-20120426 Sorry about that ---------- Forwarded message ---------- From: Lluis faix=F3 Date: 2013/7/12 Subject: mv fails when trying to overwrite a file in a (map) network drive To: bug-coreutils@gnu.org If I am working in my harddisk I can move and overwrite files. I'm working on Windows XP I have a network drive (Y:\) file1 exists file2 exists if I try: mv -f file1 file2 It complains: mv: cannot move `file1' to `file2': File exists Hope the explanation is good enough. Cheers, Lluis --047d7b3a81a2b78b5204e1528997 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Forgot to say I'm using minGw with Msys latest version= :
mingw-get-inst-20120426

Sorry about that
=


---------- Forwarded message ------= ----
From: Lluis faix=F3 <= ;lluis.faixo@gmail.com>
Date: 2013/7/12
Subject: mv fails when trying to overwrite a file= in a (map) network drive
To: bug-coreutils@gnu.org
<= br>
If I am working in my harddisk I can move and = overwrite files.

I'm working on Windows XP= I have a network drive (Y:\)
file1 exists
file2 exists

if I try:
mv -f file1 file2=

It complains:

mv: = cannot move `file1' to `file2': File exists

Hope the explanation is good enough.
Cheers,
Lluis

--047d7b3a81a2b78b5204e1528997-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 24 00:21:49 2013 Received: (at 14852) by debbugs.gnu.org; 24 Jul 2013 04:21:49 +0000 Received: from localhost ([127.0.0.1]:45996 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V1qaC-0008F5-LB for submit@debbugs.gnu.org; Wed, 24 Jul 2013 00:21:49 -0400 Received: from ishtar.tlinx.org ([173.164.175.65]:59837) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V1qa9-0008Eh-2f for 14852@debbugs.gnu.org; Wed, 24 Jul 2013 00:21:46 -0400 Received: from [192.168.4.12] (Athenae [192.168.4.12]) by Ishtar.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id r6O4LZIh042633; Tue, 23 Jul 2013 21:21:37 -0700 Message-ID: <51EF564C.5010205@tlinx.org> Date: Tue, 23 Jul 2013 21:21:32 -0700 From: Linda Walsh User-Agent: Thunderbird MIME-Version: 1.0 To: Lluis faixó Subject: Re: bug#14852: Fwd: mv fails when trying to overwrite a file in a (map) network drive References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14852 Cc: 14852@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Lluis faixó wrote: > Forgot to say I'm using minGw with Msys latest version: > mingw-get-inst-20120426 > > Sorry about that > > > ---------- Forwarded message ---------- > From: Lluis faix� > Date: 2013/7/12 > Subject: mv fails when trying to overwrite a file in a (map) network drive > To: bug-coreutils@gnu.org > > > If I am working in my harddisk I can move and overwrite files. > > I'm working on Windows XP I have a network drive (Y:\) > file1 exists > file2 exists > if I try: > mv -f file1 file2 > > It complains: > > mv: cannot move `file1' to `file2': File exists ---- 1) Are the 2 files on the same drive? 2) Are one or both on a remote system (sounds like the target it but just being sure) 3) What OS running on the fileserver that you are copying to? Windows or *nix? 4) Are you aware, if you are on windows, that windows locks files by locking regions on disk -- which makes it hard for anything to come along and delete a file (like on linux) becuase windows doesn't have file handles that are separable from disk-ranges. So if a file is open for write (or exclusive read) on windows, you won't be able to delete it like you can on *nix. **You might** get away with a method I think cygwin is using now (after I suggested it years ago when it was laughed at and likely forgotten)... and that is renaming the target -- often even to another directory. That will work unless they also locked the parent directory (ug -- it's rare, but I've seen it done to prevent renaming the file so a new one could be put in place). But that's the key -- you can't "delete" it or overwrite it because both would involve writing into the locked-reserved range. But renaming it -- that's in the file-system index -- a completely separate entity from the file space (why in Goddesses name that doesn't make windows file-walks faster than on unix, I dunno -- but they usually aren't. The names and security attribs are kept in large chunks call the MftZone. It used to take 200-1000MB, up to win7 when they switched to allocating 200MB at a time (it appears). So the names usually can renamed on the same device which can allow a copy to take place. Usually then an entry goes in the win registry in the "pending renames/pending deletes key(s)... as a rename to a null filename is the same as a delete. They are not process until reboot when the file is no longer likely to be locked. Anyway, that cp might support such a hairbrained scheme wouldn't be surprising since MS needs open source to surive, now that open source is MS only real competitor (some might claim apple, but market segments are pretty different). Having a Windows away version of cp would be good. -- having it aware that if you do a cp -al on a mapped file system on a *nix system that reads as having "my new font.ttf"linked with "My New Font.ttf" and using cp -au won't go out and delete both copies so it can maintain the link which I had happen once -- but was told that it would be fixed in cygwin (never heard anything about it afterwards -- and that was about 2 years ago). Sigh. I strongly prefer the Win7 way of handling case now -- case preserving, but cause ignoring. They realized people wanted U/l case, and they coudn't simply convert one to the other w/o causing loss of information. Anyway... windows is 'weird'...you might try the rename I mentioned manually to even see if it is something that might work... But if cp can't remove the file (like it used to being able to do on an *nix based machine, then from it's perspective, it can't copy into the new file because it already exists. > > Hope the explanation is good enough. > > Cheers, > Lluis From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 21 17:23:00 2018 Received: (at 14852) by debbugs.gnu.org; 21 Oct 2018 21:23:01 +0000 Received: from localhost ([127.0.0.1]:34725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gELBc-0004vU-OA for submit@debbugs.gnu.org; Sun, 21 Oct 2018 17:23:00 -0400 Received: from mail-it1-f181.google.com ([209.85.166.181]:53997) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gELBa-0004vC-PL; Sun, 21 Oct 2018 17:22:59 -0400 Received: by mail-it1-f181.google.com with SMTP id q70-v6so9760934itb.3; Sun, 21 Oct 2018 14:22:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=9/bXCclxLbs5gEGM3Rx9BpMRyIaY1C6yCLZ/DLGWdDo=; b=LD2txyV6C22dTalap0sLSeawbkSfhu2aklqANzpyABgN+Z3frQQZ5ZqJAO3pOqbchJ QFbUhNzYfZRs7jT0Yeenofux7kRqZCoCfW7JTOW/gra2QbKoxOid/nfWWBA2C7GdtIuv GLwTI68NCmjrFctCvlOwKIsfmPNA3oSdYjUlh24JVgztgierWsib5ipyI8sP11jJzaBD UT997ZGfZon/07xjlzDm/XRKV4u8TGzSWl6Ew6cZAHZ/g55PP+c/pUDOXrG3bvCYGmuF T2aaAOsEOqCkzIQB/i5eaSal0CYAAh+wDmwPkJPZphqqCATnCIBLDjyhbXo2zNr0s1Za g70g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=9/bXCclxLbs5gEGM3Rx9BpMRyIaY1C6yCLZ/DLGWdDo=; b=dEJADuzbILBf+tAc+BOgXzo89Shm2YXm4TwIf2ZLsoTdRlYtTEQKeM0ueOR7SwkT2t 3XvKw/kP/mx+s04f6VM8MRH32jdAH2T0X/ENexPqn0MKB6b0pMbiQ12xzckJ4oFhpbIS QpMoaamdsH2Nv/VwsS+rd3sli66qk6SxmoudBqsViQ/5bM4GvUHa8AxDWQXxnp1FsLpE giC27fvQSirIrbVq3QxGEyLvt6x+wdIfWAinewxVdp5mvc9Ujgj32UuMxTZV/hmENnVF Fg9jv4JD5Y3alKLDpVhGQHzPMUJ5uU7fEcmX5T7Gs1FUsvmyE3VGa31ihYcUrZMt8ILR ll9w== X-Gm-Message-State: ABuFfoi8aIHOEB7cyB0D+/3H0Ypf0BOCOm/+IFkTlVDeeDowvRUsmXYX gA1YmjV4lZ8Ff6ljOi0Gh/61lEl0 X-Google-Smtp-Source: ACcGV631ERoP1XbNocEKGNkupW/6ClXKV2XUFdwHq0WC+DujdS9tlVQub7GfnAhlY3DpK9QLGCBkOA== X-Received: by 2002:a24:20d:: with SMTP id 13-v6mr8013290itu.37.1540156972480; Sun, 21 Oct 2018 14:22:52 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id b2-v6sm1380346ioc.51.2018.10.21.14.22.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Oct 2018 14:22:51 -0700 (PDT) Subject: Re: bug#14852: Fwd: mv fails when trying to overwrite a file in a (map) network drive To: 14852@debbugs.gnu.org References: <51EF564C.5010205@tlinx.org> From: Assaf Gordon Message-ID: <2a541f1e-eb66-d402-2c5a-40a9cc5d0437@gmail.com> Date: Sun, 21 Oct 2018 15:22:49 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <51EF564C.5010205@tlinx.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 14852 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 14852 notabug close 14852 stop (triaging old bugs) On 23/07/13 10:21 PM, Linda Walsh wrote: > Lluis faixó wrote: >>[...] >> It complains: >> >> mv: cannot move `file1' to `file2': File exists > 1) Are the 2 files on the same drive? > 2) Are one or both on a remote system (sounds like the target it > but just being sure) > 3) What OS running on the fileserver that you are copying to? Windows > or *nix? > [....] > But if cp can't remove the file (like it used to being able to do on an *nix > based machine, > then from it's perspective, it can't copy into the new file because it already > exists. With no further follow-ups in 5 years, I'm closing this bug. -assaf From unknown Mon Aug 18 04:36:15 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 19 Nov 2018 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator