Bug: Hard link in perl 5.8.6 under Solaris 8?

Discussion in 'Perl Misc' started by daveo, Mar 21, 2005.

  1. daveo

    daveo Guest

    I have an interesting problem. I have a file and directory which exist
    on the same device but are pointed to by symlinks from another device.
    First the directory:

    $ ls -l /var/opt/zip/Zantaz/spool
    lrwxrwxrwx 1 root other 20 Mar 21 15:58
    /var/opt/zip/Zantaz/spool -> /spool0/Zantaz-spool

    I'll do a df to show the device it's pointing to:

    $ df /var/opt/zip/Zantaz/spool
    /spool0 (/dev/vx/dsk/dbdg/vol01):67653708 blocks 8456713
    files

    Now for the file:

    $ ls -l /var/opt/zip/Zmaster/spool/00/0000033070.0003883500
    -rw------- 1 zip zip 412 Mar 18 20:27
    /var/opt/zip/Zmaster/spool/00/0000033070.0003883500

    $ df /var/opt/zip/Zmaster/spool/00/0000033070.0003883500
    /spool0 (/dev/vx/dsk/dbdg/vol01):67653708 blocks 8456713
    files

    OK. The Solaris link command works fine:

    $ ln /var/opt/zip/Zmaster/spool/00/0000033070.0003883500 \
    /var/opt/zip/Zantaz/spool
    $
    $ ls -lL /var/opt/zip/Zantaz/spool
    total 2
    -rw------- 2 zip zip 412 Mar 18 20:27
    0000033070.0003883500

    OK. I've removed the file. Now I'll try it with the following perl
    program:

    $ cat /tmp/test
    link("/var/opt/zip/Zmaster/spool/00/0000033070.0003883500",
    "/var/opt/zip/Zantaz/spool"
    ) || die "$0: link failed: $!\n";

    $ perl /tmp/test
    /tmp/test: link failed: Cross-device link

    Any ideas what's going on here? Is this a well known bug?

    Thanks.

    Dave
     
    daveo, Mar 21, 2005
    #1
    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:
    882
    Kevin Spencer
    May 17, 2005
  2. Michael Glavitsch

    java font selection under solaris 8

    Michael Glavitsch, Jul 15, 2003, in forum: Java
    Replies:
    1
    Views:
    462
    Roedy Green
    Jul 15, 2003
  3. jojo
    Replies:
    29
    Views:
    4,429
    Larry Barowski
    Sep 6, 2005
  4. Gancy
    Replies:
    2
    Views:
    123
    Anno Siegel
    Jan 27, 2005
  5. Jamie
    Replies:
    0
    Views:
    163
    Jamie
    Feb 23, 2005
Loading...

Share This Page