From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 13 00:16:42 2005 Return-Path: X-Original-To: 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 C980A16A420 for ; Tue, 13 Dec 2005 00:16:42 +0000 (GMT) (envelope-from jinmtb@sbcglobal.net) Received: from smtp106.sbc.mail.mud.yahoo.com (smtp106.sbc.mail.mud.yahoo.com [68.142.198.205]) by mx1.FreeBSD.org (Postfix) with SMTP id 4CC8F43D53 for ; Tue, 13 Dec 2005 00:16:41 +0000 (GMT) (envelope-from jinmtb@sbcglobal.net) Received: (qmail 155 invoked from network); 12 Dec 2005 23:45:49 -0000 Received: from unknown (HELO ?192.168.2.8?) (jinmtb@sbcglobal.net@68.127.176.52 with plain) by smtp106.sbc.mail.mud.yahoo.com with SMTP; 12 Dec 2005 23:45:48 -0000 Message-ID: <439E0D13.8010508@sbcglobal.net> Date: Mon, 12 Dec 2005 15:51:47 -0800 From: "Jin Guojun [VFFS]" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20051013 X-Accept-Language: zh, zh-CN, en MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 13 Dec 2005 01:27:11 +0000 Cc: Subject: command line switch to disable following symlink in DIFF program 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: Tue, 13 Dec 2005 00:16:42 -0000 Is "diff" program supposed to have a switch at command line to disable following (ignore) symbolic links when -r switch is given, like many other programs do? In many places, a directory or source file can be symbolically linked multiple times to different archives. Since the original source will be diffed anyway, why "diff" needs to follow symlinks to compare a same source multiple times? In the other case, if partition A has a symlink to somewhere in partition B, which has a symlink back to partition A , then "diff -r" will loop forever. I think that "diff" need a switch to disable following symlink to compare final object, instead, just check if symlink exists in both checked directories, like ls -P. -Jin