comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: unix/idl question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: unix/idl question [message #67108 is a reply to message #67106] Mon, 22 June 2009 04:55 Go to previous message
Foldy Lajos is currently offline  Foldy Lajos
Messages: 268
Registered: October 2001
Senior Member
On Mon, 22 Jun 2009, a wrote:

> Hi
>
> I am having a problem that i want to delete many files with the 'raw'
> extension in folder temp
>
> in unix
>
> cd temp
> rm *raw
> /bin/rm: Argument list too long.
>
> ok, so
>
> cd temp
> ls -l | grep raw | awk '{print $9}' | xargs rm
>
> works ok
>
> but I have to be in the directory to do it
>
> I want to do the same from idl and not being in the temp directory
>
> ie
>
> spawn,'cd temp'
> spawn,'ls -l | grep raw | awk '{print $9}' | xargs rm '
>
> but the first spawn does not leave me in the temp directory
>
> any ideas?
>
> Thanks
>
> Russ
>
>


find /tmp/ -name '*raw' | xargs rm

or (for files with whitespace in the names):

find /tmp/ -name '*raw' -print0 | xargs -0 rm


regards,
lajos
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: unix/idl question
Next Topic: Centering Image

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 11:44:53 PDT 2025

Total time taken to generate the page: 1.67995 seconds