Re: long string using find and "-exec ls -ls" to find part-of fi

看板FB_questions作者時間11年前 (2014/06/30 15:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串10/20 (看更多)
===== Organization: Thought Unlimited. Public service Unix since 1986. Of_Interest: With 27++ years of service to the Unix community. On Mon, Jun 30, 2014 at 01:03:59PM +0700, Olivier Nicole wrote: > Gary, > > On Mon, Jun 30, 2014 at 12:30 PM, Gary Kline <kline@thought.org> wrote: > > ===== > > Organization: Thought Unlimited. Public service Unix since 1986. > > Of_Interest: With 27++ years of service to the Unix community. > > > > On Mon, Jun 30, 2014 at 12:09:04PM +0700, Olivier Nicole wrote: > >> > find . -name foo.tar -o -name foo.tgz -o -name foo.tar.gz|xargs ls -lsi > >> > >> With parenthesis: > >> > >> find . \( -name foo.tar -o -name foo.tgz -o -name foo.tar.gz \) |xargs ls -lsi > >> > >> Olivier > >> > >> > > > > > right! but 4 more keystrokes. :_) > > And 33 keystrokes to complain for the extra 4s! And I did not count > the line break and click on "send" :) > > Olivier > > > gary well or Alas, I wrote three more paragraphs but hit an extra key and sent it. BOING. Reason my try failed was that I was searching for "foo" instead of "vbc.tar/vbc.tgz/vbc.tar.gz. if I have a foo.c|tar|tgz it is junked. ANYWAY, the thing learned tonight is that it's *XARGS* <cmd> instead of -exec abcfubarCmd. bedtime here. thanks you guys! I's gonna put this stuff in a sh script so I never have to waste ttwo++ hours. gary -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix Twenty-seven years of service to the Unix community. _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
文章代碼(AID): #1JiGilTy (FB_questions)
討論串 (同標題文章)
完整討論串 (本文為第 10 之 20 篇):
文章代碼(AID): #1JiGilTy (FB_questions)