From owner-freebsd-questions Fri Aug 30 22:14:21 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id WAA20880 for questions-outgoing; Fri, 30 Aug 1996 22:14:21 -0700 (PDT) Received: from trapdoor.dstc.edu.au (root@trapdoor.dstc.edu.au [130.102.176.12]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id WAA20875 for ; Fri, 30 Aug 1996 22:14:18 -0700 (PDT) Received: from azure.dstc.edu.au (azure.dstc.edu.au [130.102.176.27]) by trapdoor.dstc.edu.au (8.6.9/8.6.12) with ESMTP id PAA11943 for ; Sat, 31 Aug 1996 15:14:10 +1000 Received: (from leonard@localhost) by azure.dstc.edu.au (8.6.10/8.6.12) id PAA23562 for questions@freebsd.org; Sat, 31 Aug 1996 15:14:10 +1000 From: David Leonard Message-Id: <199608310514.PAA23562@azure.dstc.edu.au> Subject: mkdir over symlinks To: questions@freebsd.org Date: Sat, 31 Aug 1996 15:14:09 +1000 (EST) Reply-To: leonard@dstc.edu.au X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I want to know if I can rely on a certain behaviour of symlink directory resolution wrt mkdir and rm. I have a symlink pointing to a non-existent directory on a 'scratch' disk, /u3: # ll /usr/obj 0 lrwxr-xr-x 1 root wheel 7 Aug 19 11:35 /usr/obj@ -> /u3/obj now, # rm -rf /u3/obj and then try to make the directory on the symlink. I tried this with the extensions '', '/.' and '/' of which the last form works! # mkdir /usr/obj mkdir: /usr/obj: File exists # mkdir /usr/obj/. mkdir: /usr/obj/.: No such file or directory # mkdir /usr/obj/ # ll -d /u3/obj 4 drwxrwxr-x 2 root wheel 512 Aug 31 14:58 /u3/obj/ question: can I rely on this behaviour of directory resolution with symlinks? is it a posix thing? i couldnt find the relevant info on posix symlinks (don't even know if it exists) also, there is an analogue to 'rm -rf' where the /u3/obj directory is deleted when you 'rm -rf /usr/obj/' but the symlink /usr/obj remains behind. this is handy. d -- David Leonard Developer, DSTC The University of Queensland david.leonard@dstc.edu.au http://www.dstc.edu.au/~leonard/ >> Distributed Solutions Event http://www.dstc.edu.au/events/dse96/ <<