From debbugs-submit-bounces@debbugs.gnu.org Fri May 07 17:01:43 2010 Received: (at submit) by debbugs.gnu.org; 7 May 2010 21:01:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OAUg3-0002LZ-9e for submit@debbugs.gnu.org; Fri, 07 May 2010 17:01:43 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OAUFR-00027z-Sp for submit@debbugs.gnu.org; Fri, 07 May 2010 16:34:23 -0400 Received: from lists.gnu.org ([199.232.76.165]:58945) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OAUEl-0007Ku-5p for submit@debbugs.gnu.org; Fri, 07 May 2010 16:33:31 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OAUEj-0006pv-Ii for bug-coreutils@gnu.org; Fri, 07 May 2010 16:33:29 -0400 Received: from [140.186.70.92] (port=41113 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OAUEa-0006Rd-VH for bug-coreutils@gnu.org; Fri, 07 May 2010 16:33:29 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OAUES-0002Tj-Tl for bug-coreutils@gnu.org; Fri, 07 May 2010 16:33:14 -0400 Received: from mail-yw0-f197.google.com ([209.85.211.197]:44483) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OAUES-0002Td-Pj for bug-coreutils@gnu.org; Fri, 07 May 2010 16:33:12 -0400 Received: by ywh35 with SMTP id 35so1445531ywh.24 for ; Fri, 07 May 2010 13:33:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=qmBoZRWviMWztOJoA/t54piLCtGtDD08tuMJ8a4YjO8=; b=rsETI9dVLVNBVFI+TAL6//R/FXV1o6Vp83qBtMkZ9W2Odtb/tEgMIkN4TWyDorGRUO w2oryMi90itVf740eKN1QKYid43v2qzI2yWr972KHPBSqS09I+FOFuhjui4ZhQWxFYT5 ynO4f7mZBsB0DR+yK/xcpk+Py2ki4a7L5H6oY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=KV9kH+GJZBQCbzCccOM3hGmpSkOjbY1hrKVN+pgfiuwV99WsK/HSejIGpFK0eOQSOE bgqkmJIr+OvS3CDvvansXBahIWl6Q7a0SIehkmv2vbhyRF3zBRxT5Dd8u73RLJoRgqMo 4Z5Ojsw8iPrjDCqVdFgTNP8kslc04zbN0DlNs= MIME-Version: 1.0 Received: by 10.151.88.22 with SMTP id q22mr4306683ybl.149.1273264392080; Fri, 07 May 2010 13:33:12 -0700 (PDT) Received: by 10.151.50.11 with HTTP; Fri, 7 May 2010 13:33:11 -0700 (PDT) Date: Fri, 7 May 2010 15:33:11 -0500 Message-ID: Subject: mv while maintaining relative symbolic links From: Peng Yu To: bug-coreutils@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 07 May 2010 17:01:42 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) I'm wondering if there is any tool that can do almost exact the same thing as mv, but it can maintain symbolic links. mv doens't maintain relative symbolic links. For example, I have file /tmp/A/file1.txt and a symbolic link /tmp/file1.txt that point to A/file.txt (by the relative path). If I mv /tmp/A to /tmp/B, the link /tmp/file1.txt will be broken. Another example: I have file /tmp/file1.txt and symbolic link /tmp/A/file1.txt that points to ../file1.txt (by relative path). If I move /tmp/A to /tmp/B/A, the symbolic /tmp/A/file1.txt will be broken. Could you please let me know if there is a tool that can maintain the symbolic links? -- Regards, Peng From debbugs-submit-bounces@debbugs.gnu.org Fri May 07 18:03:29 2010 Received: (at 6138) by debbugs.gnu.org; 7 May 2010 22:03:29 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OAVdo-0002mV-OO for submit@debbugs.gnu.org; Fri, 07 May 2010 18:03:28 -0400 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OAVdn-0002mN-5k; Fri, 07 May 2010 18:03:27 -0400 Received: from dementia.proulx.com (dementia.proulx.com [192.168.230.115]) by joseki.proulx.com (Postfix) with ESMTP id 4C43C21362; Fri, 7 May 2010 16:03:25 -0600 (MDT) Received: by dementia.proulx.com (Postfix, from userid 1000) id 442913CC2E6; Fri, 7 May 2010 16:03:25 -0600 (MDT) Date: Fri, 7 May 2010 16:03:25 -0600 From: Bob Proulx To: Peng Yu Subject: Re: bug#6138: mv while maintaining relative symbolic links Message-ID: <20100507220325.GA31853@dementia.proulx.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 6138 Cc: 6138@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) severity 6138 wishlist thanks Peng Yu wrote: > I'm wondering if there is any tool that can do almost exact the same > thing as mv, but it can maintain symbolic links. > > mv doens't maintain relative symbolic links. For example, I have file > /tmp/A/file1.txt and a symbolic link /tmp/file1.txt that point to > A/file.txt (by the relative path). If I mv /tmp/A to /tmp/B, the link > /tmp/file1.txt will be broken. For clarification you said: file /tmp/A/file1.txt symlink /tmp/file1.txt -> A/file.txt But I think you meant to say: file /tmp/A/file1.txt symlink /tmp/file1.txt -> A/file1.txt After moving /tmp/A to /tmp/B file /tmp/B/file1.txt symlink /tmp/file1.txt -> B/file1.txt (proposed) This is not possible. Symbolic links are simply files in the filesystem. Special files, of course, but otherwise just files. The two files /tmp/file1.txt and /tmp/A/file1.txt are unrelated to each other in any way other than by content of /tmp/file1.txt. To do what you are asking would require that every move operation consult the contents of every symlink on the filesystem and adjust those other symlinks. Worse this is not only on the current filesystem but also on other filesystems. Because symlinks are not real file links but simply a run time name conversion a symlink may exist on other filesystems. Those other filesystems may be over NFS or other network filesystem. Other filesystems may not even be powered up and online at the time! Also other symlinks may point to this file but only incidentally, in which case they would get changed even though they are unrelated. > Another example: I have file /tmp/file1.txt and symbolic link > /tmp/A/file1.txt that points to ../file1.txt (by relative path). If I > move /tmp/A to /tmp/B/A, the symbolic /tmp/A/file1.txt will be broken. file /tmp/file1.txt symlink /tmp/A/file1.txt -> ../file1.txt After moving to a different level of hiearchy: file /tmp/file1.txt symlink /tmp/A/B/file1.txt -> ../file1.txt A tool is possible that reads the value of the link (readlink) and then removes the old symlink and creates a new (unrelated) symlink in the target location but with a new path calculated to the old location. That would not be a move operation. That would be something different that removed the old and created a new. But if that is what you wanted then you probably wanted to convert the symlink to an absolute path first and then you could move it. Off the top of my head here is a simple script that I haven't tested and may or may not behave reasonably. In particular error handling is poor. #!/bin/sh -e src=$1 dst=$2 path=$(readlink -f "$src") rm -f "$src" ln -s "$path" "$src" mv "$src" "$dst" I am sure that there are related tools here but nothing immediately comes to my mind. I have always simply scripted the operation that I required at the moment. Bob From debbugs-submit-bounces@debbugs.gnu.org Sat May 08 10:02:47 2010 Received: (at submit) by debbugs.gnu.org; 8 May 2010 14:02:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OAkcA-0001cJ-IJ for submit@debbugs.gnu.org; Sat, 08 May 2010 10:02:47 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OAkZ9-0001a0-5A for submit@debbugs.gnu.org; Sat, 08 May 2010 09:59:39 -0400 Received: from lists.gnu.org ([199.232.76.165]:38523) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OAkZ9-0008EN-CR for submit@debbugs.gnu.org; Sat, 08 May 2010 09:59:39 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OAkZ8-0007Qb-Ts for bug-coreutils@gnu.org; Sat, 08 May 2010 09:59:38 -0400 Received: from [140.186.70.92] (port=59827 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OAkZ6-0007QT-VR for bug-coreutils@gnu.org; Sat, 08 May 2010 09:59:38 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OAkZ2-0006qY-To for bug-coreutils@gnu.org; Sat, 08 May 2010 09:59:36 -0400 Received: from mail-gw0-f41.google.com ([74.125.83.41]:53371) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OAkZ2-0006qN-Q4 for bug-coreutils@gnu.org; Sat, 08 May 2010 09:59:32 -0400 Received: by gwj18 with SMTP id 18so2001862gwj.0 for ; Sat, 08 May 2010 06:59:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=pFJd6wU9Or1FWwpwHees4e7NRBJ9WsB+rTyprJy3niY=; b=DMQ+k3impSbM+i0O3r/R/fJOmT+TVWgDZ3rSw8jE22YlMhrd3dN0kqUZbLwiKTrojn cYE7PpfZuuh04sRa9AVDX5RSOpmyEwOh255hBIV8Lr8qBzbYsG3eY+6A2AHRhSsjy2wy /V5WeI6eS6AWS0WAWOAEkiuvt8I8+Cpxth7q8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=NUk0GRO1atRNtouvK9zHpe4iPEdyWKxOpGWabsAAdAM0DplxZWESovfamR8YmP2UGL 20DJ7zXwqXkAgRd+QgJQ7Jx2qOIyeG8+BX1cpL+tzlC0sXCt6MzJe3IXNiV/SeO379R3 HLBLfP59MKiNYb2UPvpiwjLoF1UyBczUK5NNU= MIME-Version: 1.0 Received: by 10.150.62.2 with SMTP id k2mr3651778yba.425.1273327172104; Sat, 08 May 2010 06:59:32 -0700 (PDT) Received: by 10.151.50.11 with HTTP; Sat, 8 May 2010 06:59:31 -0700 (PDT) In-Reply-To: <20100507220325.GA31853@dementia.proulx.com> References: <20100507220325.GA31853@dementia.proulx.com> Date: Sat, 8 May 2010 08:59:31 -0500 Message-ID: Subject: Re: bug#6138: mv while maintaining relative symbolic links From: Peng Yu To: Bob Proulx Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 08 May 2010 10:02:44 -0400 Cc: 6138@debbugs.gnu.org, bug-coreutils@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) On Fri, May 7, 2010 at 5:03 PM, Bob Proulx wrote: > severity 6138 wishlist > thanks > > Peng Yu wrote: >> I'm wondering if there is any tool that can do almost exact the same >> thing as mv, but it can maintain symbolic links. >> >> mv doens't maintain relative symbolic links. For example, I have file >> /tmp/A/file1.txt and a symbolic link /tmp/file1.txt that point to >> A/file.txt (by the relative path). If I mv /tmp/A to /tmp/B, the link >> /tmp/file1.txt will be broken. > > For clarification you said: > > =A0file =A0 =A0 /tmp/A/file1.txt > =A0symlink =A0/tmp/file1.txt -> A/file.txt > > But I think you meant to say: You are right. It is a typo. > =A0file =A0 =A0 /tmp/A/file1.txt > =A0symlink =A0/tmp/file1.txt -> A/file1.txt > > =A0After moving /tmp/A to /tmp/B > > =A0file =A0 =A0 /tmp/B/file1.txt > =A0symlink =A0/tmp/file1.txt -> B/file1.txt (proposed) > > This is not possible. =A0Symbolic links are simply files in the > filesystem. =A0Special files, of course, but otherwise just files. > The two files /tmp/file1.txt and /tmp/A/file1.txt are unrelated to > each other in any way other than by content of /tmp/file1.txt. > > To do what you are asking would require that every move operation > consult the contents of every symlink on the filesystem and adjust > those other symlinks. =A0Worse this is not only on the current > filesystem but also on other filesystems. =A0Because symlinks are not > real file links but simply a run time name conversion a symlink may > exist on other filesystems. =A0Those other filesystems may be over NFS > or other network filesystem. =A0Other filesystems may not even be > powered up and online at the time! =A0Also other symlinks may point to > this file but only incidentally, in which case they would get changed > even though they are unrelated. I agree with you that this is may not be possible for whole file system. But under the assumptions that symbolic links and their targets are always in a number of directories (user configurable) on the same file system, then it is doable. This is practically what I need. >> Another example: I have file /tmp/file1.txt and symbolic link >> /tmp/A/file1.txt that points to ../file1.txt (by relative path). If I >> move /tmp/A to /tmp/B/A, the symbolic /tmp/A/file1.txt will be broken. > > =A0file =A0 =A0 /tmp/file1.txt > =A0symlink =A0/tmp/A/file1.txt -> ../file1.txt > > =A0After moving to a different level of hiearchy: > > =A0file =A0 =A0 /tmp/file1.txt > =A0symlink =A0/tmp/A/B/file1.txt -> ../file1.txt > > A tool is possible that reads the value of the link (readlink) and > then removes the old symlink and creates a new (unrelated) symlink in > the target location but with a new path calculated to the old > location. =A0That would not be a move operation. =A0That would be > something different that removed the old and created a new. > > But if that is what you wanted then you probably wanted to convert the > symlink to an absolute path first and then you could move it. =A0Off the > top of my head here is a simple script that I haven't tested and may > or may not behave reasonably. =A0In particular error handling is poor. Error handling is important as, otherwise, it might mess up with the files and could be a disaster. > =A0#!/bin/sh -e > =A0src=3D$1 > =A0dst=3D$2 > =A0path=3D$(readlink -f "$src") > =A0rm -f "$src" > =A0ln -s "$path" "$src" > =A0mv "$src" "$dst" > > I am sure that there are related tools here but nothing immediately > comes to my mind. =A0I have always simply scripted the operation that I > required at the moment. If anybody else knows some related tools for refined requirement (see above clarification), please let me know. --=20 Regards, Peng From debbugs-submit-bounces@debbugs.gnu.org Mon May 10 05:38:41 2010 Received: (at submit) by debbugs.gnu.org; 10 May 2010 09:38:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBPRh-0002yr-4P for submit@debbugs.gnu.org; Mon, 10 May 2010 05:38:41 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBPQp-0002y2-17 for submit@debbugs.gnu.org; Mon, 10 May 2010 05:37:47 -0400 Received: from lists.gnu.org ([199.232.76.165]:54433) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OBPQm-0003co-Dd for submit@debbugs.gnu.org; Mon, 10 May 2010 05:37:44 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OBPQl-0000vO-Fr for bug-coreutils@gnu.org; Mon, 10 May 2010 05:37:43 -0400 Received: from [140.186.70.92] (port=56363 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBPQZ-0000sz-AA for bug-coreutils@gnu.org; Mon, 10 May 2010 05:37:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBPQG-0002Sq-0o for bug-coreutils@gnu.org; Mon, 10 May 2010 05:37:31 -0400 Received: from m0019.fra.mmp.de.bt.com ([62.180.227.30]:54573 helo=ms04.m0019.fra.mmp.de.bt.com) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBPQF-0002SZ-Mq for bug-coreutils@gnu.org; Mon, 10 May 2010 05:37:11 -0400 Received: from senmx12-mx ([62.134.46.10] [62.134.46.10]) by ms04.m0020.fra.mmp.de.bt.com with ESMTP id BT-MMP-112615; Mon, 10 May 2010 11:37:08 +0200 Received: from MCHP064A.global-ad.net (unknown [172.29.37.63]) by senmx12-mx (Server) with ESMTP id B92B423F028E; Mon, 10 May 2010 11:37:08 +0200 (CEST) Received: from MCHP058A.global-ad.net ([172.29.37.55]) by MCHP064A.global-ad.net ([172.29.37.63]) with mapi; Mon, 10 May 2010 11:37:08 +0200 From: "Voelker, Bernhard" To: Peng Yu , Bob Proulx Date: Mon, 10 May 2010 11:37:07 +0200 Subject: RE: bug#6138: mv while maintaining relative symbolic links Thread-Topic: bug#6138: mv while maintaining relative symbolic links Thread-Index: AcruuvD8t9zZ0A5ZTrq/74Dqn8eMJwBaRSfg Message-ID: <7856072A9D04C24B82DFE2B1112FE38AE0883F89@MCHP058A.global-ad.net> References: <20100507220325.GA31853@dementia.proulx.com> In-Reply-To: Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 10 May 2010 05:38:37 -0400 Cc: "6138@debbugs.gnu.org" <6138@debbugs.gnu.org>, "bug-coreutils@gnu.org" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.8 (----) Peng Yu wrote: > I agree with you that this is may not be possible for whole file > system. But under the assumptions that symbolic links and their > targets are always in a number of directories (user configurable) on > the same file system, then it is doable. This is practically what I > need. you need a reference to the actual inode, don't you? So what a about using hardlinks? Have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Mon May 10 09:17:54 2010 Received: (at submit) by debbugs.gnu.org; 10 May 2010 13:17:54 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBSrq-0005CW-7W for submit@debbugs.gnu.org; Mon, 10 May 2010 09:17:54 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBSnw-0005AF-G6 for submit@debbugs.gnu.org; Mon, 10 May 2010 09:13:52 -0400 Received: from lists.gnu.org ([199.232.76.165]:46000) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OBSnr-0000qY-JS for submit@debbugs.gnu.org; Mon, 10 May 2010 09:13:47 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OBSnq-0000jj-Gw for bug-coreutils@gnu.org; Mon, 10 May 2010 09:13:46 -0400 Received: from [140.186.70.92] (port=38425 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBSnj-0000eR-Io for bug-coreutils@gnu.org; Mon, 10 May 2010 09:13:45 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBSnb-00015w-J6 for bug-coreutils@gnu.org; Mon, 10 May 2010 09:13:39 -0400 Received: from mail-gy0-f169.google.com ([209.85.160.169]:58244) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBSnb-00015m-CE for bug-coreutils@gnu.org; Mon, 10 May 2010 09:13:31 -0400 Received: by gyg4 with SMTP id 4so3435675gyg.0 for ; Mon, 10 May 2010 06:13:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=nyQGRoskEzkCoVS3slR+tEEf6gM/YWtPl5ivafD+xWA=; b=QOP6s4G2grI+xoGJsWW0FFFdLOllGOdh2Eomso+6dyecEUilsTtvw8+1A0p8mNnTaI alL40/kR0WOLdMVa0Sb2UQqwxp3+Uq5YepbD5ShAHCHamXDUPGGXekkQGL+BR8iceBIP gzejaUOlvjBUQ/p5S8CJDNXgDB20wL/DNQwBI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=gaqv6CuZGobQAUOa5VHW8V5mPpPLNfsBOxyBlyY+YZHJDVdzdzDsrVEfUDk+LIjVaP NiIQJFkeQwy195Y1mdRvrVJvEpc9M0lyde+AW3cPxWtO3VJeaiy6F1H16T/pCis7+PAs 0cKmBvBje/UPZQvjIPYk5D0FS4ym/dvnHyQmQ= MIME-Version: 1.0 Received: by 10.150.127.15 with SMTP id z15mr9441862ybc.89.1273497210790; Mon, 10 May 2010 06:13:30 -0700 (PDT) Received: by 10.150.190.8 with HTTP; Mon, 10 May 2010 06:13:30 -0700 (PDT) In-Reply-To: <7856072A9D04C24B82DFE2B1112FE38AE0883F89@MCHP058A.global-ad.net> References: <20100507220325.GA31853@dementia.proulx.com> <7856072A9D04C24B82DFE2B1112FE38AE0883F89@MCHP058A.global-ad.net> Date: Mon, 10 May 2010 08:13:30 -0500 Message-ID: Subject: Re: bug#6138: mv while maintaining relative symbolic links From: Peng Yu To: "Voelker, Bernhard" Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.8 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 10 May 2010 09:17:52 -0400 Cc: "6138@debbugs.gnu.org" <6138@debbugs.gnu.org>, "bug-coreutils@gnu.org" , Bob Proulx X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) On Mon, May 10, 2010 at 4:37 AM, Voelker, Bernhard wrote: > Peng Yu wrote: > >> I agree with you that this is may not be possible for whole file >> system. But under the assumptions that symbolic links and their >> targets are always in a number of directories (user configurable) on >> the same file system, then it is doable. This is practically what I >> need. > > you need a reference to the actual inode, don't you? > So what a about using hardlinks? Harlinks do not work across filesystems. I think that it is better stick with symbolic links. -- Regards, Peng From debbugs-submit-bounces@debbugs.gnu.org Mon May 10 10:11:04 2010 Received: (at submit) by debbugs.gnu.org; 10 May 2010 14:11:04 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBThH-0005ab-HA for submit@debbugs.gnu.org; Mon, 10 May 2010 10:11:04 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBTIy-0005PY-Qt for submit@debbugs.gnu.org; Mon, 10 May 2010 09:45:57 -0400 Received: from lists.gnu.org ([199.232.76.165]:59020) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OBTIu-0001SP-2R for submit@debbugs.gnu.org; Mon, 10 May 2010 09:45:52 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OBTIt-0006P3-DT for bug-coreutils@gnu.org; Mon, 10 May 2010 09:45:51 -0400 Received: from [140.186.70.92] (port=51500 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBTIo-0006Me-4H for bug-coreutils@gnu.org; Mon, 10 May 2010 09:45:51 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBTIi-0006DF-VQ for bug-coreutils@gnu.org; Mon, 10 May 2010 09:45:45 -0400 Received: from m0019.fra.mmp.de.bt.com ([62.180.227.30]:53817 helo=ms04.m0019.fra.mmp.de.bt.com) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBTIi-0006D2-MI for bug-coreutils@gnu.org; Mon, 10 May 2010 09:45:40 -0400 Received: from senmx12-mx ([62.134.46.10] [62.134.46.10]) by ms04.m0020.fra.mmp.de.bt.com with ESMTP id BT-MMP-117258; Mon, 10 May 2010 15:45:36 +0200 Received: from MCHP063A.global-ad.net (unknown [172.29.37.61]) by senmx12-mx (Server) with ESMTP id AD2C623F0292; Mon, 10 May 2010 15:45:36 +0200 (CEST) Received: from MCHP058A.global-ad.net ([172.29.37.55]) by MCHP063A.global-ad.net ([172.29.37.61]) with mapi; Mon, 10 May 2010 15:45:36 +0200 From: "Voelker, Bernhard" To: Peng Yu Date: Mon, 10 May 2010 15:45:35 +0200 Subject: RE: bug#6138: mv while maintaining relative symbolic links Thread-Topic: bug#6138: mv while maintaining relative symbolic links Thread-Index: AcrwQpaSK2kaRS1mTMaiw+/Hqoc0/QAAwUvw Message-ID: <7856072A9D04C24B82DFE2B1112FE38AE088416D@MCHP058A.global-ad.net> References: <20100507220325.GA31853@dementia.proulx.com> <7856072A9D04C24B82DFE2B1112FE38AE0883F89@MCHP058A.global-ad.net> In-Reply-To: Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.9 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 10 May 2010 10:11:01 -0400 Cc: "6138@debbugs.gnu.org" <6138@debbugs.gnu.org>, "bug-coreutils@gnu.org" , Bob Proulx X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.1 (-----) Peng Yu wrote: > On Mon, May 10, 2010 at 4:37 AM, Voelker, Bernhard wrote: >> you need a reference to the actual inode, don't you? >> So what a about using hardlinks? > > Harlinks do not work across filesystems. I think that it is better > stick with symbolic links. you are right, of course. You'll have to decide what you need: either you want to have a stable filename (then you use symlinks), or you want a stable inode reference (then you use hardlinks, unless you're on a different filesystem) ... or like Bob wrote: write your own shell script for that situation. Have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 07 19:22:41 2010 Received: (at 6138) by debbugs.gnu.org; 7 Jun 2010 23:22:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLleS-0005p8-OV for submit@debbugs.gnu.org; Mon, 07 Jun 2010 19:22:40 -0400 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLleP-0005ou-6e for 6138@debbugs.gnu.org; Mon, 07 Jun 2010 19:22:37 -0400 Received: from dementia.proulx.com (dementia.proulx.com [192.168.230.115]) by joseki.proulx.com (Postfix) with ESMTP id A435A21362; Mon, 7 Jun 2010 17:22:32 -0600 (MDT) Received: by dementia.proulx.com (Postfix, from userid 1000) id 9D0953CD899; Mon, 7 Jun 2010 17:22:32 -0600 (MDT) Date: Mon, 7 Jun 2010 17:22:32 -0600 From: Bob Proulx To: Peng Yu Subject: Re: bug#6138: mv while maintaining relative symbolic links Message-ID: <20100607232232.GD585@dementia.proulx.com> References: <20100507220325.GA31853@dementia.proulx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 6138 Cc: 6138@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.4 (--) Peng Yu wrote: > Bob Proulx wrote: > > To do what you are asking would require that every move operation > > consult the contents of every symlink on the filesystem and adjust > > those other symlinks. Worse this is not only on the current > > filesystem but also on other filesystems. ... > > I agree with you that this is may not be possible for whole file > system. But under the assumptions that symbolic links and their > targets are always in a number of directories (user configurable) on > the same file system, then it is doable. This is practically what I > need. Is there any new information on this issue? Have you made any progress on your own solution? > If anybody else knows some related tools for refined requirement (see > above clarification), please let me know. I am not aware of anything that already exists to do what you are asking. Bob From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 07 19:44:43 2010 Received: (at 6138-done) by debbugs.gnu.org; 7 Jun 2010 23:44:43 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLlzn-00060T-In for submit@debbugs.gnu.org; Mon, 07 Jun 2010 19:44:43 -0400 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLlzm-00060M-3B for 6138-done@debbugs.gnu.org; Mon, 07 Jun 2010 19:44:42 -0400 Received: from dementia.proulx.com (dementia.proulx.com [192.168.230.115]) by joseki.proulx.com (Postfix) with ESMTP id 98C0221378; Mon, 7 Jun 2010 17:44:37 -0600 (MDT) Received: by dementia.proulx.com (Postfix, from userid 1000) id 919833CD899; Mon, 7 Jun 2010 17:44:37 -0600 (MDT) Date: Mon, 7 Jun 2010 17:44:37 -0600 From: Bob Proulx To: Peng Yu Subject: Re: bug#6138: mv while maintaining relative symbolic links Message-ID: <20100607234437.GA8617@dementia.proulx.com> References: <20100507220325.GA31853@dementia.proulx.com> <20100607232232.GD585@dementia.proulx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 6138-done Cc: 6138-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.4 (--) Peng Yu wrote: > Bob Proulx wrote: > > Is there any new information on this issue? Have you made any > > progress on your own solution? > > No. I don't find any tool either. I think it is unlikely (I haven't read any enthusiasm for it from the group) for adding this type of functionality to mv. I think it might be possible to implement but if so then it should be in a different standalone program. It wouldn't be trivial. It would be complicated enough that if written it might only work acceptably for three people in the universe. So I don't know. I am therefore inclined to mark this bug ticket closed in the bug tracking system. That doesn't mean an end to discussion on the mailing list. Please feel free to follow up. The bug tracker will keep track of the discussion and the issue can be awakened if needed. Bob From unknown Sun Jun 22 07:48:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 06 Jul 2010 11:24:03 +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