link command is not working.

H

Hon Seng Phuah

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?
 
J

Joe Smith

Hon said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top