From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 21 15:05:35 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 75BD216A4E0 for ; Mon, 21 Aug 2006 15:05:35 +0000 (UTC) (envelope-from artifact.one@googlemail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8547143D45 for ; Mon, 21 Aug 2006 15:05:34 +0000 (GMT) (envelope-from artifact.one@googlemail.com) Received: by nf-out-0910.google.com with SMTP id n29so2106004nfc for ; Mon, 21 Aug 2006 08:05:33 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=G8q8cWsIOuj+kNa3NjqDZzCMBnNDf3crB1DZ88hJfvWXuoZMpKH66QfC61dZufAbPAW7PVwHtIAyriNbsO7Jl9/vuX4lMdXR0fWNROpQFqTZEJlbzCMkmgkc2OOfk2hv2REPlDsINUwE/JoRM/vzJK1qEC06/V/NyrQ5i+94orU= Received: by 10.49.41.12 with SMTP id t12mr7810369nfj; Mon, 21 Aug 2006 08:05:33 -0700 (PDT) Received: by 10.49.54.3 with HTTP; Mon, 21 Aug 2006 08:05:33 -0700 (PDT) Message-ID: <8e96a0b90608210805m561e29e5g41bdd25ff9dfa94c@mail.gmail.com> Date: Mon, 21 Aug 2006 16:05:33 +0100 From: "mal content" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Relative paths [was: Path transformation] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Aug 2006 15:05:35 -0000 Thanks to all who helped point me towards realpath(). I have another favour to ask: Is there a function that can take two absolute paths and generate a relative path, from source to destination? /usr/bin/false /bin Becomes: ../../bin /bin /usr/bin/false Becomes: ../usr/bin/false thanks, MC