From: "Denis G. Samsonenko" <d.g.samsonenko@gmail.com> To: "ALT Linux Community" <community@lists.altlinux.org> Subject: Re: [Comm] Argument list too long Date: Fri, 3 Nov 2006 17:28:30 +0900 Message-ID: <957265820611030028r7705dc09qcbb9efc92d964cb8@mail.gmail.com> (raw) In-Reply-To: <m34pth3pv9.fsf@evg.krastel.ru> Привет! 03.11.06, Evgenii Terechkov написал: > > man xargs > > Читаю. Но не читав до этого и зная всего лишь о "-0" и так активно > пользовался. > > > вот примерно так, как в примерах: > > find /tmp -name core -type f -print | xargs /bin/rm -f > > find /tmp -name core -type f -print0 | xargs -0 /bin/rm -f > > cut -d: -f1 < /etc/passwd | sort | xargs echo > > Вы про > > --max-chars=max-chars, -s max-chars > Use at most max-chars characters per command line, including the > command and initial arguments and the terminating nulls at the > ends of the argument strings. The default is as large as possi- > ble, up to 20k characters. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > Т.е. я, например, хочу чтобы "find /var/cache/apt/archives -type f > -print0|xargs -0 rm -f" вылилось в вызов минимального количества процессов > rm, у каждого из которых максимально длинный список аргументов. Это оно и > есть (я просто уже забыл, сколько там этот лимит. 20к?)? Там же в мане прямо так и написано. Т.е., на сколько я понимаю, просто не задавать этот параметр, и он будет разбивать исходный список аргументов на максимально возможные строки и скармливать их следующей команде по очереди. Вроде бы это удовлетворяет аостановке задачи? -- Всего доброго, Денис.
next prev parent reply other threads:[~2006-11-03 8:28 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-11-03 6:50 Artem Zolochevskiy 2006-11-03 7:26 ` Eugene Suchkov 2006-11-03 7:35 ` Evgenii Terechkov 2006-11-03 7:53 ` Denis G. Samsonenko 2006-11-03 8:18 ` Evgenii Terechkov 2006-11-03 8:28 ` Denis G. Samsonenko [this message] 2006-11-03 9:08 ` Evgenii Terechkov 2006-11-03 9:34 ` Artem Zolochevskiy 2006-11-03 11:59 ` Sergey Vlasov 2006-11-03 7:55 ` [Comm] [OBORONA-SPAM] " Alexey Novikov 2006-11-03 19:33 ` [Comm] " Yura Kalinichenko 2006-11-07 6:17 ` Kostarev Alexey 2006-11-03 8:09 ` Eugene Ostapets 2006-11-07 4:41 ` Arkadiy Pavlik 2006-11-07 5:09 ` Evgenii Terechkov 2006-11-07 13:47 ` [Comm] [JT] " Michael Shigorin 2006-11-03 9:57 ` [Comm] " Kostarev Alexey
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=957265820611030028r7705dc09qcbb9efc92d964cb8@mail.gmail.com \ --to=d.g.samsonenko@gmail.com \ --cc=community@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git