HP3000-L Archives

December 2000, Week 5

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"VANCE,JEFF (HP-Cupertino,ex1)" <[log in to unmask]>
Reply To:
VANCE,JEFF (HP-Cupertino,ex1)
Date:
Thu, 28 Dec 2000 21:34:49 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (37 lines)
> A :PURGE of a link does *not* purge the link.  It purges the file the
> link points to.

Correct.  The CI's PURGE command fopen's the file and if the open
succeeds fclose's it to delete it.  FOPEN follows symbolic links.
HPFOPEN allows you to control whether or not to follow symlinks (at
least I believe this is so).  In general, if FOPEN is called the target
of the symlink is opened and then acted upon.

> It's not at all obvious to me why one would  want it to do
> this and I'd rather not think too long about my recent
> experience regarding why one would NOT want it to do this!

There are many commands that should act upon the target of a symlink,
the PRINT command for instance.  These commands have one thing in
common -- they all FOPEN the file in question.  Thus, we decided that
FOPEN should follow symlinks.  This raises questions for commands like
PURGE and RENAME since they both FOPEN the supplied filename.  We
created the PURGELINK command to address this case.  PURGELINK also is
able to purge files and empty directories.  It is implemented similarly
to the shell's rm command, which does not FOPEN the target file.  rm and
PURGELINK works strictly on the underlying directory and not the file
system.

> For anyone not terribly familiar with links, be warned --
> :PURGE is not the same as :RM.HPBIN.SYS (or :PURGELINK for that
> matter).

Correct.

> For anyone else, can you give me some understanding of why
> this was designed this way?

I hope my above explanation helps.

 Jeff Vance, CSY

ATOM RSS1 RSS2