On Tue, May 16, 2000 at 08:45:30AM -0600, SoloCDM wrote:
> Recently I executed the following command:
>
> rm -f dummy "ls -t msg.* | sed -e 1,900d"
>
> As a result, I received the following error:
>
> bash: /bin/ls: Argument list too long
>
> I know why (14,522 msg.* files exist in the directory), but I need a
> solution.
Is it your intention to delete all but the newest 900 files?
Try it once without the xargs statement and see if it gives you the file
list you expect.
rm -r dummy
find . -type f -name "msg.*" -printf "%A@\t%p\n" | sort | sed -e 1,900d | cut -f2 |
xargs rm -f
--
Steve Borho Voice: 314-615-6365
Member of Technical Staff
Celox Networking Inc
Fortune of the day:
manic-depressive, adj.:
Easy glum, easy glow.
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.