Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 07 Nov 1999 11:44:41 +0000
From:      David Malone <dwmalone@maths.tcd.ie>
To:        Sean Eric Fagan <sef@kithrup.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Procfs' pointers to files. 
Message-ID:   <199911071144.aa35139@salmon.maths.tcd.ie>
In-Reply-To: Your message of "Sat, 06 Nov 1999 11:29:40 PST." <199911061929.LAA06259@kithrup.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> >You can make hard links to
> 
> No, you cannot.

Yes you can - you just need to make sure the target directory is on
the same filesystem as the *original* file.

11:30:gonzo 9% cp /bin/sleep /tmp
11:30:gonzo 10% ls -l /tmp/sleep*
-r-xr-xr-x  1 dwmalone  wheel  45224 Nov  7 11:30 /tmp/sleep
11:30:gonzo 11% /tmp/sleep 100000 &
[1] 636
11:31:gonzo 12% ln /proc/636/file /tmp/sleep2
11:31:gonzo 13% ls -l /tmp/sleep*
-r-xr-xr-x  2 dwmalone  wheel  45224 Nov  7 11:30 /tmp/sleep
-r-xr-xr-x  2 dwmalone  wheel  45224 Nov  7 11:30 /tmp/sleep2
11:32:gonzo 14% chmod u+s /tmp/sleep2
11:32:gonzo 15% ls -l /tmp/sleep* /proc/636/file
-r-sr-xr-x  2 dwmalone  wheel  45224 Nov  7 11:30 /proc/636/file
-r-sr-xr-x  2 dwmalone  wheel  45224 Nov  7 11:30 /tmp/sleep
-r-sr-xr-x  2 dwmalone  wheel  45224 Nov  7 11:30 /tmp/sleep2

	David.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi? <199911071144.aa35139>