From owner-freebsd-arch Tue Dec 19 5:21:38 2000 From owner-freebsd-arch@FreeBSD.ORG Tue Dec 19 05:21:34 2000 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from ringworld.nanolink.com (ringworld.nanolink.com [195.24.48.189]) by hub.freebsd.org (Postfix) with SMTP id 9B26C37B6AF for ; Tue, 19 Dec 2000 05:21:27 -0800 (PST) Received: (qmail 2053 invoked by uid 1000); 19 Dec 2000 13:19:58 -0000 Date: Tue, 19 Dec 2000 15:19:58 +0200 From: Peter Pentchev To: arch@FreeBSD.org Subject: rm(1)'s -v behavior - filenames vs. paths? Message-ID: <20001219151957.B559@ringworld.oblivion.bg> Mail-Followup-To: arch@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Is there a reason that rm -v only shows the filename of the files being removed, instead of e.g. a relative path? The attached patch makes it much easier to monitor the progress of a rm -rfv on a large tree (e.g. a very-very-very mangled FreeBSD source tree, which is being scrubbed before cvs'ing it all from scratch). If I'm trampling on any standards, feel free to point it out :) I do not have access to any ANSI/IEEE/POSIX standards at this time, except for the online SUSv2 reference. G'luck, Peter -- If the meanings of 'true' and 'false' were switched, then this sentence wouldn't be false. Index: rm.c =================================================================== RCS file: /home/ncvs/src/bin/rm/rm.c,v retrieving revision 1.31 diff -u -r1.31 rm.c --- rm.c 2000/06/17 14:19:32 1.31 +++ rm.c 2000/12/18 14:35:38 @@ -253,7 +253,7 @@ if (rval == 0 || (fflag && errno == ENOENT)) { if (rval == 0 && vflag) (void)printf("%s\n", - p->fts_accpath); + p->fts_path); continue; } break; @@ -263,7 +263,7 @@ if (rval == 0 && (fflag && errno == ENOENT)) { if (vflag) (void)printf("%s\n", - p->fts_accpath); + p->fts_path); continue; } break; @@ -275,7 +275,7 @@ if (rval == 0 || (fflag && errno == ENOENT)) { if (rval == 0 && vflag) (void)printf("%s\n", - p->fts_accpath); + p->fts_path); continue; } } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message