Tool to automatically update symlinks when moving files

Bill McGonigle bill at bfccomputing.com
Thu Jul 9 18:00:10 EDT 2009


On 07/01/2009 12:21 PM, VirginSnow at vfemail.net 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?

Depending on how ugly you want to get, you could store lists of
referrers and referents in POSIX xattrs and update them with a mv
wrapper.  You have size limits and race conditions to worry about,
though; current ext4 work should lift the size limits when that lands.
I think the VFS has the tools you need if your lists are small enough:

  http://tinyurl.com/ext2symlinks

That's probably less awful than building a parallel database for some
use cases.

-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 at bfccomputing.com
Blog: http://blog.bfccomputing.com/
VCard: http://bfccomputing.com/vcard/bill.vcf


More information about the gnhlug-discuss mailing list