in reply to
Hard linking with Perl
You can create hard links with the builtin
link
function.
link( $file, $newfile ) or die $!;
[download]
Comment on
Re: Hard linking with Perl
Download
Code
Replies are listed 'Best First'.
Re^2: Hard linking with Perl
by
astroboy
(Chaplain)
on Jul 21, 2005 at 21:37 UTC
Cheers guys. I take it that this means that in order to replicate "cp -al", I need to traverse the directory tree, and copy it by replicating the directory structure, and hard linking to each file in turn.
[reply]
Re^3: Hard linking with Perl
by
friedo
(Prior)
on Jul 21, 2005 at 21:41 UTC
Also check out
File::Find
( or
File::Finder
),
File::Basename
, and
File::Path
. They will aid you in your quest.
[reply]
In Section
Seekers of Perl Wisdom