ok a silly question off topic....

Thomas Dodd ted at cypress.com
Thu Oct 2 20:18:08 UTC 2003


stephan schutter wrote:
> I fidured I could... but why would this not work for me?
> 
> ls -lh |grep drw | \ while read i; do \ (tar -zcvf $i.tgz $i)

What fails?
I'm not a bash user so I'm not sure about the syntax.

But I think I'd use find for this.

"find . -type d -maxdepth 1 -name \?\* -print -exec tar -czf \{\}.tgz 
\{\} \;"

one line, works in tcsh.

> and zip all the folders in the given location to it's own file...

You mean tar and gzip of course :)

	-Thomas





More information about the fedora-test-list mailing list