From owner-freebsd-questions@FreeBSD.ORG Tue Nov 7 14:37:30 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 85EF516A49E for ; Tue, 7 Nov 2006 14:37:30 +0000 (UTC) (envelope-from gpeel@thenetnow.com) Received: from constellation.thenetnow.com (thenetnow.com [69.90.69.141]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA91243D8A for ; Tue, 7 Nov 2006 14:37:21 +0000 (GMT) (envelope-from gpeel@thenetnow.com) Received: from hpeel.ody.ca ([216.240.12.2] helo=GRANT) by constellation.thenetnow.com with esmtpa (Exim 4.54) id 1GhS4g-0007n9-O2 for freebsd-questions@freebsd.org; Tue, 07 Nov 2006 09:37:14 -0500 Message-ID: <00ff01c7027a$36263dd0$6501a8c0@GRANT> From: "Grant Peel" To: Date: Tue, 7 Nov 2006 09:37:11 -0500 Organization: The Net Now MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Mailman-Approved-At: Tue, 07 Nov 2006 17:42:48 +0000 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: 'cd' ing inside a shell script X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Grant Peel List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Nov 2006 14:37:30 -0000 Hi all, Some of my webmail users are using lots of disk space. I want to make a shell script, like so: cd /home/webmail/public_html/cgi-bin/etc/users ; du -h -d1 | grep M | = sort -nr -k1 and run it daily in a cronjob, mailing the results to my assistants. with the 'cd' at that start of the script have any adverse affect on the = rest of the system or cronjobs? OK, will the scripot just complete and = exit, with the 'cd' having no affect? -Grant