Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Feb 2012 13:41:06 -0500
From:      Robert Huff <roberthuff@rcn.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: 'rm' Can not delete files
Message-ID:  <20274.49602.237856.78617@jerusalem.litteratus.org>
In-Reply-To: <CAHhngE3F7PYNuOfKk1bogzpXw1pjBzhtB_6q-1gqR7=OPSh_3Q@mail.gmail.com>
References:  <1237723287.20120207235924@yandex.ru> <4F31A15C.3050506@gmail.com> <3DFDF5C0-2D39-4A88-B3B5-7D236A7FC4DA@dont-panic.org> <CAHhngE3F7PYNuOfKk1bogzpXw1pjBzhtB_6q-1gqR7=OPSh_3Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
David Brodbeck writes:

>  > What helps me sometimes is wrapping it up:
>  >
>  > for i in *; do rm $i; done
>  
>  Won't that just expand the * and result in the same problem?  It
>  seems like you've just moved the problem from the rm statement to
>  the for statement.

	If the problem is the command line to rm being too long, this
will work.
	Yes, the '*" will get expanded to the list of files ... but
that will happen _within_ the running shell.  (Using the services of
glob(3) or something similar.)
	The command line to "rm" will have a single file-name, and
should not be a problem.


				Robert Huff




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20274.49602.237856.78617>