Hi Jim & Rick,

Yeah, i'm running jBase under windows, due to the huge records stored
in the directory, the window explorer hanged somewhere once i open the
&COMO& file. Therefore, i'm trying to delete the files in jBase.

For the info you've provided, i manage to perform the task
successfully.

Thank you so much for your help. Appreciate everyone posted the
comment here.... :)

Good day and Best wishes,
Chloe



On May 13, 9:25 pm, Jim Idle <j...@temporal-wave.com> wrote:
> r...@designbais.com wrote:
> > Chloe,
>
> > Like Jim says, you should use the OS to do this.  
>
> Using SELECT and DELETE (not DELETE-FILE) will work fine, it just won't
> be very fast.
>
> > The &COMO& file is
> > an OS level directory.  If you are running jBASE under Windows (you
> > didn't give enough info for this), then you can simply use Windows
> > Explorer to sort the directory by date modified and then remove the
> > records you don't want.
>
> > I am not a guru on Unix, but you could use a grep to find all these
> > files also.
>
> The problem with grep:
>
> grep -lv "MAY" \&COMO\&/*
>
> Is that it won't limit itself to the first line, so it will preserve
> anything that contains MAY anywhere. Awk is much better:
>
> find \&COMO\& | xargs awk '(NR == 1) && /MAY/  { print FILENAME }' |
> xargs rm
>
> And if you make a script:
>
> #! /bin/bash
>
> FILES=$(find \&COMO\& | xargs awk '(NR == 1) && /$1/  { print FILENAME }')
>
> for $F in $FILES
> do
>   echo "Deleteing log file ${F}"
>   rm $F
> done
>
> You can run it with arguments ($1 is the first script argument). It is
> possible to do all of that entirely in awk of course.
>
> Jim

--~--~---------~--~----~------------~-------~--~----~
Please read the posting guidelines at: 
http://groups.google.com/group/jBASE/web/Posting%20Guidelines

IMPORTANT: Type T24: at the start of the subject line for questions specific to 
Globus/T24

To post, send email to jBASE@googlegroups.com
To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to