Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jun 2014 23:58:32 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Gary Kline <kline@thought.org>
Cc:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
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> <CA%2Bg%2BBvg1=o71ObOpbh4ry-=unj2HOjjmcQHX1DOeAfwyhLu=QQ@mail.gmail.com> <20140630053004.GB16901@ethic.thought.org> <CA%2Bg%2BBvh%2BDk0iYCjbGKVt59-nfDoCFQ6qmArrJu7ueaT7VzDi1g@mail.gmail.com> <20140630064044.GA25085@ethic.thought.org> <20140630230316.44ec3257.freebsd@edvax.de> <20140630213909.GA21861@ethic.thought.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140630235832.9ec60e91.freebsd>