[Linux-disciples] rm: invalid argument
Adam Rosi-Kessel
adam at rosi-kessel.org
Thu Aug 25 19:43:18 EDT 2011
Try forcing the path to rm
Sent from my iPhone
On Aug 25, 2011, at 7:30 PM, Jamie Forrest <jamie at jamieforrest.com> wrote:
> I'll try the xargs -i. I'd tried inserting echo before the rm and ended up getting the same error as the rm, but this time it was happening on the echo.
>
> Sent from my iPad
>
> On Aug 25, 2011, at 7:18 PM, Adam Rosi-Kessel <adam at rosi-kessel.org> wrote:
>
>> Ah, I meant xargs -i rm '{}'
>>
>> It should be only one argument per line.
>>
>> You can also try inserting echo before rm in your -exec version and check out that output.
>>
>> Sent from my iPhone
>>
>> On Aug 25, 2011, at 7:08 PM, Jamie Forrest <jamie at jamieforrest.com> wrote:
>>
>>> Tried that and got argument list too long.
>>>
>>> Sent from mobile
>>>
>>> On Aug 25, 2011, at 7:00 PM, Adam Rosi-Kessel <adam at rosi-kessel.org> wrote:
>>>
>>>> Try piping into xargs rm instead just as a test.
>>>>
>>>> Sent from my iPhone
>>>>
>>>> On Aug 25, 2011, at 6:56 PM, Jamie Forrest <jamie at jamieforrest.com> wrote:
>>>>
>>>>> On Thu, Aug 25, 2011 at 6:47 PM, Adam Rosi-Kessel <adam at rosi-kessel.org> wrote:
>>>>> What difference, if any, between servers? Generally Cygwin path should put cyg commands ahead of windows/DOS ones. Did you try putting single quotes around the {}?
>>>>>
>>>>> Yeah, single quotes didn't help. AFAIK the environments are identical.
>>>>>
>>>>>
>>>>> On Aug 25, 2011, at 5:39 PM, Jamie Forrest <jamie at jamieforrest.com> wrote:
>>>>>
>>>>>> This is a bit off topic because I am using gnuwin32 on Windows Server 2003 SP2, but I figured people here might be able to help. I've written a find command to find all xml files in a certain directory that are older than 20 minutes, and delete them. Here's the command:
>>>>>>
>>>>>> C:\gnuwin32\GetGnuWin32\gnuwin32\bin\find.exe /mydir/*.xml -mmin +20 -exec rm -f {} \ ;
>>>>>>
>>>>>> This is working fine on 2 of my 3 servers. On the third server, I am getting this error over and over (likely on every file in the directory):
>>>>>>
>>>>>> C:\gnuwin32\GetGnuWin32\gnuwin32\bin\find.exe: rm: Invalid argument
>>>>>> C:\gnuwin32\GetGnuWin32\gnuwin32\bin\find.exe: error waiting for rm: No child processes
>>>>>>
>>>>>> Google hasn't been much help. Do you guys have any leads? (FYI the reason I am calling the full path on find.exe is because the default "find" command points to the dos "find" command, and I don't want to mess with the PATH to fix this.)
>>>>>>
>>>>>> Thanks!
>>>>>> Jamie
>>>>>>
>>>>>> --
>>>>>> http://about.me/jamieforrest
>>>>>>
>>>>>> _______________________________________________
>>>>>> Linux-disciples mailing list
>>>>>> Linux-disciples at lists.bostoncoop.net
>>>>>> http://lists.bostoncoop.net/mailman/listinfo/linux-disciples
>>>>>
>>>>> _______________________________________________
>>>>> Linux-disciples mailing list
>>>>> Linux-disciples at lists.bostoncoop.net
>>>>> http://lists.bostoncoop.net/mailman/listinfo/linux-disciples
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> http://about.me/jamieforrest
>>>>> _______________________________________________
>>>>> Linux-disciples mailing list
>>>>> Linux-disciples at lists.bostoncoop.net
>>>>> http://lists.bostoncoop.net/mailman/listinfo/linux-disciples
>>>> _______________________________________________
>>>> Linux-disciples mailing list
>>>> Linux-disciples at lists.bostoncoop.net
>>>> http://lists.bostoncoop.net/mailman/listinfo/linux-disciples
>>> _______________________________________________
>>> Linux-disciples mailing list
>>> Linux-disciples at lists.bostoncoop.net
>>> http://lists.bostoncoop.net/mailman/listinfo/linux-disciples
>> _______________________________________________
>> Linux-disciples mailing list
>> Linux-disciples at lists.bostoncoop.net
>> http://lists.bostoncoop.net/mailman/listinfo/linux-disciples
> _______________________________________________
> Linux-disciples mailing list
> Linux-disciples at lists.bostoncoop.net
> http://lists.bostoncoop.net/mailman/listinfo/linux-disciples
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20110825/058bd9f3/attachment-0001.htm
More information about the Linux-disciples
mailing list