rm - Argument list too long

Paul Schmehl pauls at utdallas.edu
Fri Jan 27 15:52:22 PST 2006


--On Saturday, January 28, 2006 05:04:00 +0530 "FlashWebHost.com" 
<flashweb at gmail.com> wrote:

> Hi,
>
> I am getting error "Argument list too long." when deleting files from
> /tmp directory.
>
> ------------------------------------
> server20# uname -a
> FreeBSD server20.hosthat.com 5.4-RELEASE FreeBSD 5.4-RELEASE #1: Tue
> Oct 18 06:28:41 GMT 2005
> root at server20.hosthat.com:/usr/obj/usr/src/sys/SERVER20  i386
> server20# pwd
> /tmp
> server20# ls -l sess*
> /bin/ls: Argument list too long.
> server20# rm -f sess*
> /bin/rm: Argument list too long.
> server20#
> ------------------------------------
>
> Any idea how to correct this ?
>
Sure

for files in *.*
do
rm $files
done

Paul Schmehl (pauls at utdallas.edu)
Adjunct Information Security Officer
University of Texas at Dallas
AVIEN Founding Member
http://www.utdallas.edu/ir/security/


More information about the freebsd-questions mailing list