From owner-freebsd-questions@FreeBSD.ORG Mon Nov 7 22:08:09 2005 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 58F7E16A41F for ; Mon, 7 Nov 2005 22:08:09 +0000 (GMT) (envelope-from jellis@dhnet.us) Received: from smtp1.linkline.com (smtp1.linkline.com [66.59.235.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8932B43D5F for ; Mon, 7 Nov 2005 22:08:06 +0000 (GMT) (envelope-from jellis@dhnet.us) Received: from [64.30.211.58] (64-30-211-58.dsl.linkline.com [64.30.211.58]) by smtp1.linkline.com (Postfix) with ESMTP id DFF4E9CCEE; Mon, 7 Nov 2005 14:08:02 -0800 (PST) User-Agent: Microsoft-Entourage/11.2.0.050811 Date: Mon, 07 Nov 2005 14:08:04 -0800 From: Jeffrey Ellis To: David Fleck Message-ID: Thread-Topic: How to sort find results Thread-Index: AcXj57mO+AhOd0/aEdqYJgAKlXMBfA== In-Reply-To: <20051107140553.U3084@grond.sourballs.org> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Cc: FreeBSD questions Subject: Re: How to sort find results X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Nov 2005 22:08:09 -0000 Y'know, being a newbie at something is about as stupid as things generally get. So I'm feeling totally dumb at the moment. The directory I need to perform the find on, when using find, is just "/". find -x / The -x is to limit the find to only the startup volume. But when I try: # ./date_sort / I get: use: bad interpreter: No such file or directory I am in the proper directory (the one where date_sort is located) and did the chmod. Something really obvious right? Like the directory for this script to do the same thing find is doing needs a different form? All My Best, Jeffrey on 11/7/05 12:24 PM, David Fleck at david.fleck@mchsi.com wrote: > On Mon, 7 Nov 2005, Jeffrey Ellis wrote: > >> Hi, David-- >> >> Thank you. >> >> Wow. That looks great... >> >> Um... Can you tell me how to run it? > > Assuming you've saved everything from '#!/usr/bin/perl' to the final '}', > inclusive, to a file, name the file something, like 'date_sort'. Then > > chmod +x date_sort > > ./date_sort /directory/to/sort > > I use this primarily on directory hierarchies of regular files, so I'm not > guaranteeing what will happen if you use it on directories that contain > other sorts of files. > > > -- > David Fleck > david.fleck@mchsi.com >