From owner-freebsd-questions Fri Sep 8 23:21:23 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mailhost01.reflexnet.net (mailhost01.reflexnet.net [64.6.192.82]) by hub.freebsd.org (Postfix) with ESMTP id 1E21537B449 for ; Fri, 8 Sep 2000 23:21:20 -0700 (PDT) Received: from 149.211.6.64.reflexcom.com ([64.6.211.149]) by mailhost01.reflexnet.net with Microsoft SMTPSVC(5.5.1877.197.19); Fri, 8 Sep 2000 23:20:11 -0700 Received: (from cjc@localhost) by 149.211.6.64.reflexcom.com (8.9.3/8.9.3) id XAA61939; Fri, 8 Sep 2000 23:20:58 -0700 (PDT) (envelope-from cjc) Date: Fri, 8 Sep 2000 23:20:52 -0700 From: "Crist J . Clark" To: Bentley Rhodes Cc: freebsd-questions@FreeBSD.ORG Subject: Re: hard links vs soft links, plus... Message-ID: <20000908232052.Q69158@149.211.6.64.reflexcom.com> Reply-To: cjclark@alum.mit.edu References: <39B98C43.380F570B@mediaone.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <39B98C43.380F570B@mediaone.net>; from bentley3@mediaone.net on Fri, Sep 08, 2000 at 09:03:01PM -0400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Sep 08, 2000 at 09:03:01PM -0400, Bentley Rhodes wrote: > zero, i've been using FreeBSD 4.x for about 2 weeks...luv it, has > nothing on windows, but no killer games. I think you mean, Windows has nothing on FreeBSD, but whatever. > first, where if anyone doesn't mind me asking here...are the THEMES for > enlightenment kept globally? Don't use it. > second, where is the directory for APACHE kept ... so i can use host my > web page Don't use it, but have a look up in /usr/local. Also you can always look at /var/db/pkg/apache*/+CONTENTS to see installed files. > third , is there any way i can use different cursors (like windows > cursors) in enlightenment I am absolutely sure there is. > fourth: > > i know that say. ... > [ ln -s /usr/whatever ] > can be used to point to directories or files...and that > [ ln /usr/whatever/file(s) ] > has to be used specifically for files (right?)....so besides that (if > i'm right)...whats the difference in Linking? > does a HARD LINK mean that i have that file on my computer? instead of > another users computer or area? i guess i mean copying (cp ).....but > that would be redundant. > > i know SOFT links redirect to the area or file...and if i [ cd .. ] > from it , say as an FTP thing, someone could end up in my root > directory. so my theory is that if i make a hard link to a file...then > basically, i still save space because the file is only like what...a > couple of kilobytes, versus the real file? > > bottom line...can someone fess up whats the best? OK, here's how it works. A "file" can be thought of as a bunch of data at a certain location on the hard drive. All files are just these groups of data on the HDD. There is no real directory tree structure at this level. Now, the directory tree is an abstraction that arranges these files into a something a human can easily use by associating names to these files and arranging them into the tree. The name in the directory is just a label for this file on the hard drive. Now, why does this bunch of data on the hard drive, this file, need to only have one name in the directory tree? Associating a name with a file is linking. When you make a hard link, you are making another name for this file in the directory tree. There is absolutely no difference between a "real" name and a hardlinked name. They are the same type of beast. The original name was just another hardlink, it just happened to be the first one. Now, a symlink lives at a higher level of abstraction. It's actually a little easier to understand. Whenever the name of a symlink appears in a pathname, you can just do a string substitution and insert the target of the symlink in for its name. For example, if, lnkname -> target/path Then the path, this/path/lnkname/tail Would become, this/path/target/path/tail One exception, when a symlink starts with a '/' it is treated as an absolute pathname and any leading componets are dropped. So in the above example, lnkname -> /target/path Then the path, this/path/lnkname/tail Becomes, /target/path/tail -- Crist J. Clark cjclark@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message