long string using find and "-exec ls -ls" to find part-of filename

Polytropon freebsd at edvax.de
Mon Jun 30 21:58:42 UTC 2014

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

By the shell:

	for F in *.tar *.tar.gz *.tgz; do
		somecommand $F

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:


Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list