what's a workaround for this?
-bash: /bin/mv: Argument list too long
On Thu, 15 Jun 2006 at 10:41pm, Mark Quitoriano wrote
what's a workaround for this?
-bash: /bin/mv: Argument list too long
More info would be helpful, but as a first approximation:
tar cO $LISTOFSTUFFTOMOVE | tar xC /path/to/move/stuff/to -f -
On 15/06/06, Mark Quitoriano markquitoriano@gmail.com wrote:
what's a workaround for this?
-bash: /bin/mv: Argument list too long
Isn't it usually xargs?
http://www.google.co.uk/search?hl=en&q=Argument+list+too+long&meta=
Yep.
Will.
im doing mv a* mv b* right now but i have more than 200K files to be moved is there a faster way?
On 6/15/06, Charles Lacroix clacroix@cegep-ste-foy.qc.ca wrote:
On Thursday 15 June 2006 10:41, Mark Quitoriano wrote:
what's a workaround for this?
-bash: /bin/mv: Argument list too long
can't you use something like
find . -exec mv {}; /new/location
it's just an idea like this...
if not
mv a* .. mv b* .. etc
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Thu, 2006-06-15 at 22:41 +0800, Mark Quitoriano wrote:
what's a workaround for this?
-bash: /bin/mv: Argument list too long
More info? Well, presuming you want to move a whole (sub-directory) of stuff, the quick and painless way is a find piped to cpio. You'll need to review a cpio or find man page, but something like this might be useful
find [abc]* -depth | cpio -pdumav </your/target/directory>
The "-depth" is optional, but has uses. The cpio "a" resets the access time (a problem if your source is read only, drop it) and the "v" says be noisy about your job.
HTH
<snip>
On Thursday 15 June 2006 10:56, William L. Maltby wrote:
On Thu, 2006-06-15 at 22:41 +0800, Mark Quitoriano wrote:
what's a workaround for this?
-bash: /bin/mv: Argument list too long
Almost forgot. Instead of find, if the names can be echoed into a file, then
cpio -pdumav </your/target/directory> </the_input_file
<snip>
or if you do it with a file .. ls dir > file.txt
perl -pi -e 's/^/mv /' file.txt perl -pi -e 's/$//new/path/for/files/' file.txt
chmod a+x file.txt ./file.txt
...
On Thu, 2006-06-15 at 11:03 -0400, Charles Lacroix wrote:
On Thursday 15 June 2006 10:56, William L. Maltby wrote:
On Thu, 2006-06-15 at 22:41 +0800, Mark Quitoriano wrote:
<snip>
or if you do it with a file .. ls dir > file.txt
perl -pi -e 's/^/mv /' file.txt perl -pi -e 's/$//new/path/for/files/' file.txt
chmod a+x file.txt ./file.txt
I quit "bash vs. perl vs. XYZ" wars when I left LFS. :-)
<snip>