public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Jan Hudec <bulb@ucw.cz>
Cc: Andreas Gruenbacher <agruen@suse.de>,
	Adam Voigt <adam@cryptocomm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: File Limit in Kernel?
Date: Wed, 13 Nov 2002 11:49:13 +0100	[thread overview]
Message-ID: <jefzu5eod2.fsf@sykes.suse.de> (raw)
In-Reply-To: <20021113095133.GC21446@vagabond> (Jan Hudec's message of "Wed, 13 Nov 2002 10:51:34 +0100")

Jan Hudec <bulb@ucw.cz> writes:

|> On Tue, Nov 12, 2002 at 04:57:20PM +0100, Andreas Gruenbacher wrote:
|> > On Tuesday 12 November 2002 16:38, Adam Voigt wrote:
|> > > I have a directory with 39,000 files in it, and I'm trying to use the cp
|> > > command to copy them into another directory, and neither the cp or the
|> > > mv command will work, they both same "argument list too long" when I
|> > > use:
|> > >
|> > > cp -f * /usr/local/www/images
|> > >
|> > > or
|> > >
|> > > mv -f * /usr/local/www/images
|> > 
|> > Note that this is not a kernel related question.

Actually it is, because it's a kernel limit.  Userspace does not have
this problem in general.

|> > expanded into a list of all entries in the current directory, which results 
|> > in a command line longer than allowed. Try this instead:
|> > 
|> > find -maxdepth 1 -print0 | \
|> > 	xargs -0 --replace=% cp -f % /usr/local/www/images
|> 
|> Find has an -exec operator in the first place, so this is a little:
|> 
|> find -maxdepth 1 -exec cp -f '{}' /usr/local/www/images ';'

Or even using the shell:

for f in *; do cp -f "$f" /usr/local/www/image; done

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  reply	other threads:[~2002-11-13 10:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-12 15:38 File Limit in Kernel? Adam Voigt
2002-11-12 15:57 ` Andreas Gruenbacher
2002-11-13  9:51   ` Jan Hudec
2002-11-13 10:49     ` Andreas Schwab [this message]
2002-11-12 16:01 ` Kent Borg
2002-11-12 16:26   ` Mark Mielke
2002-11-12 16:06 ` Chris Friesen
2002-11-12 16:08 ` Richard B. Johnson
2002-11-12 16:12 ` Matt Reppert
2002-11-12 16:16 ` Bernd Eckenfels
2002-11-12 23:23 ` Bill Davidsen
     [not found] <1037115535.1439.5.camel@beowulf.cryptocomm.com.suse.lists.linux.kernel>
2002-11-12 15:53 ` Andi Kleen
2002-11-12 21:54   ` Pavel Machek
2002-11-19 15:14     ` Shalon Wood
2002-11-19 19:44       ` Pavel Machek
2002-11-12 21:55   ` Jamie Lokier

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=jefzu5eod2.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=adam@cryptocomm.com \
    --cc=agruen@suse.de \
    --cc=bulb@ucw.cz \
    --cc=linux-kernel@vger.kernel.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox