Ed,
xargs is a Unix command that takes input (like a list of files) and does
"whatever" to that list, one item at a time.
So, for example:
ls -l | grep 'Jan 10' | xargs -i rm -i {}
[I've included rm -i for interactive remove just in case my mind or
fingers miss,
I don't want to delete anyone's .dbfs! ]
Another example I use day to day:
ps -ef | grep voyager | xargs -i kill -15 {}
the brackets represent the incoming line
Cheers,
Matt
On Fri, 2005-01-21 at 12:34 -0500, Edwards Ed wrote:
> To All,
> Is there a Unix command to remove all files that are dated Jan 10:
>
> ls -l | grep 'Jan 10'
>
>
>
> --------
> website: http://www.LazyDBA.com
> Please don't reply to RTFM questions
> Oracle documentation is here: http://tahiti.oracle.com
> To unsubscribe: see http://www.lazydba.com/unsubscribe.html
> To subscribe: see http://www.lazydba.com
> By using this list you agree to these terms:http://www.lazydba.com/legal.html
----------------------------------------------------------------
|Matthew W. Ball (Matt)
|Team Lead for Infrastructure and Reliability Group
|Endeavor Information Systems Inc.
|(e) [Email address protected]
|(p) 847-227-2678
|(f) 208-275-0869
|(u) http://www.endinfosys.com
--------------------------------------------------------------
It is inaccurate to say I hate everything.
I am strongly in favor of common sense,
common honesty, and common decency.
This makes me forever ineligible for public office.
-H.L. Mencken, writer, editor, and critic (1880-1956)
--------------------------------------------------------------
Oracle LazyDBA home page