From owner-freebsd-questions@FreeBSD.ORG Mon Jun 30 21:58:42 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A10A2121 for ; Mon, 30 Jun 2014 21:58:42 +0000 (UTC) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F7AF2A2A for ; Mon, 30 Jun 2014 21:58:41 +0000 (UTC) Received: from r56.edvax.de (port-92-195-69-249.dynamic.qsc.de [92.195.69.249]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 405973CC35; Mon, 30 Jun 2014 23:58:33 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id s5ULwWrY003312; Mon, 30 Jun 2014 23:58:32 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Mon, 30 Jun 2014 23:58:32 +0200 From: Polytropon To: Gary Kline Subject: Re: long string using find and "-exec ls -ls" to find part-of filename Message-Id: <20140630235832.9ec60e91.freebsd@edvax.de> In-Reply-To: <20140630213909.GA21861@ethic.thought.org> References: <20140630045605.GA11147@ethic.thought.org> <53B0EFF2.80205@calorieking.com> <20140630053004.GB16901@ethic.thought.org> <20140630064044.GA25085@ethic.thought.org> <20140630230316.44ec3257.freebsd@edvax.de> <20140630213909.GA21861@ethic.thought.org> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD Mailing List X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 21:58:42 -0000 On Mon, 30 Jun 2014 14:39:09 -0700, Gary Kline wrote: > ive got about 15-20 find examples and most use "-exec" foob {} \; > or whatever. I kept trying to use ls -lsi AND -exec. Zip. You can of course do without using find: Either use ls output or even let the shell itself expand *. For example: ls *.tar *.tar.gz *.tgz | while read F; do somecommand $F done By the shell: for F in *.tar *.tar.gz *.tgz; do somecommand $F done This should work similarly (except the order of the results might be different than from find, and the glob output itself will probably look different, and adding a path usually has to be done manually if not run _for_ the current directory). > One totally OT thing. my sysadmin is or will be on his honeymoon > but installed FBSD 10.X. without ports. do you know what magic > command I use to install the entire ports tree? You can either use the installation media or pull it from FTP: # cd /tmp # fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/10.0-RELEASE/ports.txz # tar xzvf ports.txz -C / # rm ports.txz This will give you the ports tree at the date of the RELEASE. Note that you have to adjust version numer and arch name according to your exact installation. Of course you could also use SVN for a first checkout, but it's probably faster with the "stock" tree. More info about updating the ports tree with Subversion here: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/svn.html -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...