I've never done a hard link, so I can't really comment. I was just making an assumption based on what the user wrote.
-----Original Message-----
From: John Yeung [mailto:gallium.arsenide@xxxxxxxxx]
Sent: Monday, July 08, 2019 5:55 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Creating a Windows Shortcut
On Mon, Jul 8, 2019 at 5:45 PM Justin Taylor <JUSTIN@xxxxxxxxxxxxx> wrote:
A symlink in a NetServer share shows the actual file size to the client. I assume he means that making a hard link actually takes up the file size on DASD.
That's... hard to believe. If it's true, then sure, that's not a great option. But... well... nobody else does hard links that way, and I get that IBM likes to be different, but this would be different in just about the stupidest way imaginable.
My own experience is not suggestive of hard links existing as space-consuming mirrors, even on IBM i. I made some hard links (using the `ln` command from Qshell) to stream files that are close to a gigabyte in size, and it happens almost instantaneously. This is on a pretty small, entry-level system.
Also note that he said symlinks are all just 1 KB. So, whatever he is using to look at the file size is telling him the file size of the *link file*. But this same method of looking at file sizes *should* tell him that a hard link is the same size as the original. It actually should not be possible to distinguish a hard link from an "original", which by definition is itself a hard link.
John Y.
As an Amazon Associate we earn from qualifying purchases.