Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: create a symlink generically..



On Apr 8,  7:11pm, fREW Schmidt wrote:
}
} I am trying to make a script that will make a bunch of symlinks. I
} want the script to be able to be run from a number of locations, so I
} can't just do:
}
} # ~/foo/bar is the current dir
} ln -s ~/foo/bar/baz ~/baz
} 
} I can do:
} 
} cp -l baz ~/baz
} 
} but it makes hard links.

Have you tried e.g.

  cp -r -s $PWD/baz ~/baz

??

Assuming you have access to GNU "cp".

I have a zsh function called "ltree" (no relation to the sorting
algorithm) that I wrote back in 1996 to copy directories by hard
or symbolic linkage; but I haven't used it in probably 10 years and
it certainly hasn't been confirmed to work with zsh newer than
3.0.x (and maybe not even that new), so I'm hesitant to post it.



Messages sorted by: Reverse Date, Date, Thread, Author