Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Hey, if it were my application that I owned/developed, I would just fix the root problem in the configuration. ;-) There are some reasonably simple changes to the core configuration that would just make everything a relative path to the program, instead of hardcoding /home/foo/java/my_app and z:\java\my_app as part of the configuration, which would solve my entire problem. However, while the application is open source, I don't know that I really want to fork the project over it ;-) Any other solution that I can think of requires much more maintenance from me, and this was relatively simple and straight forward. Until the owners of the application see things my way (unlikely - they mostly use Windows or Mac OSX, and probably don't have computers sharing like this), this is good enough.

Further, the data that I work on when I'm on Linux needs to be the same data that I work on when I'm on Windows. Constantly "installing" it (or copying or anything) back and forth to synchronise is maintenance. Symlinks means that the data is physically the same, which is what I want, while prestoing the configuration means that the configuration is still separate. There's still a lot of overlap in configuration that is OS-independant, but, again, I don't own the master code.

Finally, hardlinks merely takes the problem of symlinks all being the same file, and makes it difficult to figure out in the other direction. That is, with symlinks you can't know that anyone is symlinked to you. But with hardlinks, you can, though it's not obvious whether you're looking at the original or at the linked directory entries. They make some easy things hard (seeing that it's a link from the new directory) and some impossible things merely possible (seeing that it's linked to from the original path, although still not where those other links are).

Anyway, this CUFP was really only intended as something that others may find as an expedient "good enough" solution to a problem, not necessarily the best ideal long-term solution to the problem.

Another place to use this is if you're trying to modify a read-only source, such as an NFS partition or CDROM, without copying the entire code locally. Just create a symlink to the read-only source, presto -d all the way to the directory that contains the file you want to change, and then either presto the file to allow you to modify it, or delete the symlink and replace it with the new file. It can come in handy when the support guys ask you to copy their DVD set to your hard drive to modify a single installation file. Rather than chewing up 4GB of disk space, you chew up only the size of the changed files plus a few (hundred?) inodes.

# cd ~/tmp # ln -s /mnt/cdrom . # presto -d cdrom # cd cdrom # presto setup.sh # vi setup.sh # ./setup.sh


In reply to Re^2: Presto-chango on files [symlinks] by Tanktalus
in thread Presto-chango on files [symlinks] by Tanktalus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-23 18:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found