VirginSnow | 1 Jul 2009 18:21
Favicon

Tool to automatically update symlinks when moving files

Does anyone know of a tool that can automatically update symbolic
links when moving files around on a filesystem, so as to maintain
symlink consistency?

For example:

/off/the/cuff/example/cake # regular file
/off/the/cuff/example/coffee -> ../../../handle/drink
/off/the/handle/drink # regular file
/off/the/handle/food -> ../../cuff/example/cake

$ symlink_updating_mv --top=/off/the /off/the/cuff/example /off/the

should result in:

/off/the/cuff         # directory
/off/the/example/cake # regular file
/off/the/example/coffee -> ../../handle/drink    # removed one "../"
/off/the/handle/drink # regular file
/off/the/handle/food -> ../../example/cake       # removed "cuff/"

That is, both links pointing into and out from the directory being
moved were updated.  The links should also be updated whether they are
relative or absolute symbolic links, too.

Yes, I realize that this operation requires scanning the intire tree
rooted at "--top".  However, I do not anticipate renaming directories
frequently, so that particular cost would be acceptable to me.  Still,
I would like to be able to avoid having to manually relink files when
I shuffle them around.
(Continue reading)

Greg Rundlett | 1 Jul 2009 18:57
Picon
Favicon

Re: Tool to automatically update symlinks when moving files

On Wed, Jul 1, 2009 at 12:21 PM, <VirginSnow@...> wrote:
> Does anyone know of a tool that can automatically update symbolic
> links when moving files around on a filesystem, so as to maintain
> symlink consistency?
>
rsync has options to deal with symbolic links (and hard links) however
you'd like it to

--

-- 
Greg Rundlett
Web Developer - Initiative in Innovative Computing
http://iic.harvard.edu
camb 617-384-5872
nbpt 978-225-8302
m. 978-764-4424
-skype/aim/irc/twitter freephile
http://profiles.aim.com/freephile
Michael ODonnell | 1 Jul 2009 22:26
Picon

Re: Tool to automatically update symlinks when moving files


>> Does anyone know of a tool that can automatically update symbolic
>> links when moving files around on a filesystem, so as to maintain
>> symlink consistency?
>
>rsync has options to deal with symbolic links (and hard links) however
>you'd like it to

I think the complication he's dealing with is that he's not just
moving self-contained (sub-)hierarchies around, which is something
(as you say) that rsync handles trivially; even the humble "mv"
and "cp -a" commands can often meet the need in those situations.

His problem is that he's moving relative symlinks (or their
referents) around such that the symlinks no longer point at the
right thing and he wants something that detects that and recreates
those symlinks such that they still point at the right things when
the dust has settled.

So he wants something that (say) generates a list of symlinks and
referents prior to the move and then goes through and does the fixups
afterwards.  Of course, while it's easy to see when you've moved
a symlink it's much more tedious to detect when something you've
moved is the *referent* of a symlink - AFAIK only an exhaustive
search could reveal that.
Michael ODonnell | 1 Jul 2009 22:33
Picon

Re: Tool to automatically update symlinks when moving files


I wrote:
> His problem is that he's moving relative symlinks (or their
> referents) around such that the symlinks no longer point at the
> right thing and he wants something that detects that and recreates
> those symlinks such that they still point at the right things when
> the dust has settled.

Oh, duh.  The problem isn't limited to relative symlinks; if he moves
the referent of an absolute symlink he's got the same problem.
Ted Roche | 1 Jul 2009 23:35
Favicon
Gravatar

Pearson Education User Group Program Newsletter (LONG)

Pearson Education User Group Program Newsletter
Issue 18 -- July 2009

Thank you for reading the Pearson Education User Group Program monthly
newsletter for official group members. Please pass this along to your
colleagues and share our news and offers.

===============================================================================

QuickLinks:

Monthly User Group Contest: http://www.informit.com/usergroupwelcome
InformIT Product Review Team: http://www.informit.com/productreviewteam
InformIT Store: http://www.informit.com/store
OnPodcast Network: http://www.informit.com/podcasts/index.aspx
Twitter and Facebook: http://www.informit.com/socialconnect

===============================================================================

_News&  Announcements_

_Voices That Matter: iPhone Developers Conference_
The Voices That Matter: iPhone Developers Conference is entirely about
developing, testing and distributing applications for the iPhone and the
iTouch! This is a can't-miss conference for experienced Mac developers
looking for a succinct, easy way to get up to speed on the specific skills
needed to build, test and distribute successful applications for the iPhone
and iPod touch. Mark your calendar now for October 17-18, 2009 in Boston!
   http://www.voicesthatmatter.com/iPhone2009

(Continue reading)

Bill McGonigle | 2 Jul 2009 10:23
Favicon
Gravatar

[GNHLUG] [DLSLUG-Announce] no meeting tonight (July 2nd)

Rather than having the four of us who aren't heading off for vacation
tonight entertain each other with Nifties, I recommend spending the time
going to buy some more fireworks!

Next meeting: August 6th
Preliminary topic: Encryption

Speakers desired for all aspects of encryption.  GPG, Webs of Trust,
LUKS, X.509, Tor, etc.  We could easily have half a dozen lightning
talks and a keysigning party.  Reply-To: is set to dlslug-discuss.

-Bill

--

-- 
Bill McGonigle, Owner           Work: 603.448.4440
BFC Computing, LLC              Home: 603.448.1668
http://www.bfccomputing.com/    Cell: 603.252.2606
Twitter, etc.: bill_mcgonigle   Page: 603.442.1833
Email, IM, VOIP: bill@...
Blog: http://blog.bfccomputing.com/
VCard: http://bfccomputing.com/vcard/bill.vcf
_______________________________________________
DLSLUG-Announce mailing list
DLSLUG-Announce@...
http://dlslug.org/mailman/listinfo/dlslug-announce
_______________________________________________
gnhlug-announce mailing list
gnhlug-announce@...
http://mail.gnhlug.org/mailman/listinfo/gnhlug-announce/
(Continue reading)

Arc Riley | 2 Jul 2009 15:52
Picon
Gravatar

[GNHLUG] no GamingSIG tomorrow

We're skipping GamingSIG July (tomorrow) due to the holiday.

_______________________________________________
gnhlug-announce mailing list
gnhlug-announce@...
http://mail.gnhlug.org/mailman/listinfo/gnhlug-announce/
_______________________________________________
gnhlug-discuss mailing list
gnhlug-discuss@...
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Ted Roche | 2 Jul 2009 17:28
Favicon
Gravatar

[GNHLUG] Reminder: MONDAY CentraLUG, July 6th, Hopkinton Public Library: Philip Sbrogna, WINE

WINE may or may not stand for "WINE Is Not an Emulator;" you might
consider coming to the meeting to find out.

The July meeting of the Central New Hampshire Linux User Group,
CentraLUG, will happen on the usual first Monday of the month, starting
at 7 PM at the Hopkinton Public Library's Community Room. Gather for Q&A
and informal chat at 6:30.

Philip Sbrogna, an activist with the Monadnock Linux User Group,
MonadLUG, will be presenting WINE. Philip got his start in the field of
computers programming games for early microcomputers in '79 after which
he spent some time on mini's at DEC. After an intermission on submarines
he returned to the world of corporate computing where his daily fare at
a small southern NH company provides him some opportunity to do the DB&
Web dev thing. Personal interests include optimizing algorithms&
innovative datastructures; particularly NXDs. He's been a Linux
enthusiast since switching from Coherent to Slackware in '94.

Learn more about running Windows programs under Linux natively (Ubuntu
Jaunty for presentation). Talk will include architectural overview&
practical demonstration of what works and what doesn't. Bring your
favorite Window program along to see how it fares.

Note this meeting is at the Hopkinton Public Library,
http://hopkintontownlibrary.org/,  61 Houston Drive,
Hopkinton/Contoocook, NH. Google map here: [1]. (Also, if you are coming
from the southwest on route 202/9, the route 127 road over the Hopkinton
Dam is once again open after a long repair
closure.)

[1]
http://maps.google.com/maps?hl=en&q=61+Houston+Drive,+03229&ie=UTF8&t=h&sll=43.222436,-71.719772&sspn=0.006295,0.006295&ll=43.223097,-71.720059&spn=0.010664,0.027895&z=16
 <http://maps.google.com/maps?hl=en&q=61+Houston+Drive,+03229&ie=UTF8&t=h&sll=43.222436,-71.719772&sspn=0.006295,0.006295&ll=43.223097,-71.720059&spn=0.010664,0.027895&z=16>

--

-- 
Ted Roche
Ted Roche&  Associates, LLC
http://www.tedroche.com

_______________________________________________
gnhlug-announce mailing list
gnhlug-announce@...
http://mail.gnhlug.org/mailman/listinfo/gnhlug-announce/
Jerry Feldman | 6 Jul 2009 00:03
Favicon

Boston Linux and Unix Annual Summer BBQ XV

Annual Summer BBQ XV
When:  Saturday, July 18, 2009 from 1:00 pm to 6:00 pm
Where:  John and Shelley Chambers' home
33 Cedarwood Avenue, Waltham, MA.

Boston Linux & Unix is holding its fifteenth annual summer BBQ on
Saturday, July 18th, beginning at 1:00 p.m. Everyone is welcome. Guests
are encouraged to bring along something for the grill and the snack
table. We're holding the barbeque at the same location as the past few
years, John and Shelley Chambers' home at 33 Cedarwood Avenue, Waltham,
MA.

Please refer to the BLU website for further details and directions.
http://legacy.blu.org/cgi-bin/calendar/2009-bbq15

--

-- 
Jerry Feldman <gaf@...>
Boston Linux and Unix
PGP key id: 537C5846
PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB  CA3B 4607 4319 537C 5846

_______________________________________________
gnhlug-discuss mailing list
gnhlug-discuss@...
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Ben Scott | 7 Jul 2009 00:06
Picon

Re: Tool to automatically update symlinks when moving files

On Wed, Jul 1, 2009 at 12:21 PM, <VirginSnow@...> wrote:
> Does anyone know of a tool that can automatically update symbolic
> links when moving files around on a filesystem, so as to maintain
> symlink consistency?

  Short answer: No.

  I thought I did, but when I went looking, I found other things.  One
was a tool to report on symlinks, and remove broken ones.  Another was
a tool to maintain a link farm, but it won't fix-up a mix of files and
links, it only creates an entire symlink farm (e.g., for working with
CDs).

  Using absolute symlinks may be appropriate, depending on what you're
trying to do.

-- Ben

Gmane