/bin/cp: Argument list too long

Jay hodges at reddshell.com
Wed Dec 1 14:58:58 EST 2004


We've had the same problem (and also with ls). We solved it by adding a
"cd" command, such as
	cd /usr/lib/nessus/plugins
	ls *.nasl
	cp *.nasl /tmp/
The path is included in the arg list, so the longer the path the worse
it is.


-----Original Message-----
From: nessus-bounces at list.nessus.org
[mailto:nessus-bounces at list.nessus.org] On Behalf Of Clyde Hoadley
Sent: Wednesday, December 01, 2004 11:34 AM
To: nessus at list.nessus.org
Subject: /bin/cp: Argument list too long

I have a cron job that runs nessus-update-plugins
every morning.  It has been failing the past several
days (not quite a week now) with the following error.
"./nessus-update-plugins: /bin/cp: Argument list too long"

I concluded that the problem was caused by there being
more files in the source directory than the Linux copy
command could handle.  I was able to kludge a temporary
work around.  I'm sure there is a better way to fix the
problem but this is how I fixed my problem.

I edited my local copy of nessus-update-plugins and
changed it as follows (at, or about line 245):

# cp -p *.nasl "$pluginsdir/"
find . -name '*.nasl' -exec cp -p {} "$pluginsdir/" \; >> /tmp/stuff
#cp -p *.inc "$pluginsdir/"
find . -name '*.inc' -exec cp -p {} "$pluginsdir/" \; >> /tmp/stuff

It appears to be working again.

-- 
Clyde Hoadley
Metropolitan State College of Denver
http://clem.mscd.edu/%7Ehoadleyc/
hoadleyc at mscd.edu


_______________________________________________
Nessus mailing list
Nessus at list.nessus.org
http://mail.nessus.org/mailman/listinfo/nessus




More information about the Nessus mailing list