link command is not working.

Discussion in 'Perl' started by Hon Seng Phuah, Jun 15, 2004.

  1. I have a question on the link command. Is there any limit string
    length for the two input parameter values?

    I had written one perl script statement as follow:

    link("/pgfs3/asic3/users/hphuah/Geco/ich7/A0/abc/abc.geco/work/abc.geco.wk",
    "/pgfs3/eng/hphuah/Geco/ich7/A0/abc.geco/rel/abc.geco")

    It does not copy a file from source to its destination. I change the
    link to cp, it works fine. Any idea?
     
    Hon Seng Phuah, Jun 15, 2004
    #1
    1. Advertising

  2. Hon Seng Phuah

    Joe Smith Guest

    Hon Seng Phuah wrote:

    > I had written one perl script statement as follow:
    >
    > link("/pgfs3/asic3/users/hphuah/Geco/ich7/A0/abc/abc.geco/work/abc.geco.wk",
    > "/pgfs3/eng/hphuah/Geco/ich7/A0/abc.geco/rel/abc.geco")
    >
    > It does not copy a file from source to its destination. I change the
    > link to cp, it works fine. Any idea?


    The link() function does not copy a file. It makes a file show up
    under two different names, and only works if the directories containing
    those names are on the same disk partition.

    If /pgfs3/asic3 is on one disk and /pgfs3/eng is on another, link() will
    fail and the reason for failure will be in the $! variable.

    link("/usr/local/bin/perl","/home/inwap/jms/perl") or die "Failed: $!";
    Failed: Cross-device link at temp.pl line 1.

    -Joe
     
    Joe Smith, Jun 16, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Spencer

    Re: Link Link Link DANGER WILL ROBINSON!!!

    Kevin Spencer, May 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    867
    Kevin Spencer
    May 17, 2005
  2. Christian Seberino
    Replies:
    0
    Views:
    481
    Christian Seberino
    Oct 21, 2003
  3. Dan M
    Replies:
    5
    Views:
    431
  4. chrisdude911
    Replies:
    10
    Views:
    135,440
    srk289
    Mar 10, 2009
  5. kolesdz
    Replies:
    9
    Views:
    539
    Blinky the Shark
    Aug 22, 2007
Loading...

Share This Page