ADSM-L

Re: Too many args to dsmc command.

1998-05-01 10:40:41
Subject: Re: Too many args to dsmc command.
From: Lindsay Morris <lhmorris AT US.IBM DOT COM>
Date: Fri, 1 May 1998 10:40:41 -0400
This is a common problem.  The length of the Unix command line is limited to
(depends) 5,120 characters (maybe).  So sometimes eve "ls *", on a huge
directory, gives you messages like "Arg list too long".  And I think that's
what's happening to you.

So, if you have a *REAL* operating system like Unix or AIX, you can say
 find . -name /\*/TEST\*/\* -print  | xargs dsmc archive -archmc=DBASE
-password=dorc
To explain:
To explain:
   the "find ... -print" part should (when run by itself) print out a list of
all the files you want on stdout.  Once you get this working, pipe that list of
files into xargs (the  "... | xargs ..." part does that).   xargs will read,
from stdin, as many of the arguments as will fit, then run the command you give
it (in this case "dsmc archive....") with that many arguments.  When that's
done, xargs will read in some more arguments from stdin, and do it again- and
again.....

Note that if you give wildcards (the * character) to find, you need to precede
it with \  to tell the shell not to expand the *.



ADSM-L AT VM.MARIST DOT EDU on 05/01/98 09:55:59 AM
Please respond to ADSM-L AT VM.MARIST DOT EDU
To: ADSM-L AT VM.MARIST DOT EDU
cc:
Subject: Too many args to dsmc command.


Hello,
        I especially like the way the backup/archive client retrieval groups all
files in one tree, so I am trying to archive related files with one command.

With: dsmc archive dsmc archive -archmc=DBASE -password=dorc /*/DARC*/*
Command works fine - 20 files are archived

With: dsmc archive -archmc=DBASE -password=dorc /*/TEST*/*
Error: Too many arguments passed to command. This expands to about 34 files.

Apparently, there is an argument limit to dsmc. Does anyone know a way
around this, so that I can execute the dsmc command for all the /*/TEST*/*
files?

Thanks for any help
Ann Foster
North Shore Community College
Phone: 978.762.4000 ext. 4346
email: afoster AT nscc.mass DOT edu
<Prev in Thread] Current Thread [Next in Thread>