Re: Removing downloaded Oracle software
From: Ian Cary <ian.cary_at_ons.gsi.gov.uk>
Date: Mon, 18 May 2009 11:14:49 +0100
Message-ID: <OF56641862.6B96195E-ON802575BA.00381184-802575BA.00384A3A_at_ons.gsi.gov.uk>
Yes admittedly find .. ls was a bad example but I was actually trying to demonstrate how much more efficient xargs was than exec as xargs seems to be largely overlooked as a command on various sites that I have worked at.
> find $ORACLE_HOME -exec ls -ld {} >>exec_list \;
> takes around 3 minutes on a Linux box I have whereas
> find $ORACLE_HOME | xargs ls -ld >>xargs_list
> produces the same results in 2 seconds
>
Well,
you could even try:
Date: Mon, 18 May 2009 11:14:49 +0100
Message-ID: <OF56641862.6B96195E-ON802575BA.00381184-802575BA.00384A3A_at_ons.gsi.gov.uk>
Yes admittedly find .. ls was a bad example but I was actually trying to demonstrate how much more efficient xargs was than exec as xargs seems to be largely overlooked as a command on various sites that I have worked at.
Ian
|---------+-----------------------------> | | cichomitiko_at_gmail.| | | com | | | Sent by: | | | oracle-l-bounce_at_fr| | | eelists.org | | | | | | | | | 18/05/2009 10:52 | | | Please respond to | | | cichomitiko | | | | |---------+-----------------------------> >--------------------------------------------------------------------------------------------------------------| | | | To: Ian Cary/ONS_at_ONS | | cc: pythianbrinsmead_at_gmail.com, cemail_219_at_hotmail.com, oracle-l_at_freelists.org, | | oracle-l-bounce_at_freelists.org | | Subject: Re: Removing downloaded Oracle software | >--------------------------------------------------------------------------------------------------------------|
Ian Cary wrote:
> Slightly off topic but I'd use xargs for this approach e.g.
>
> find $ORACLE_HOME -exec ls -ld {} >>exec_list \;
>
> takes around 3 minutes on a Linux box I have whereas
>
> find $ORACLE_HOME | xargs ls -ld >>xargs_list
>
> produces the same results in 2 seconds
>
Well,
you could even try:
find ... -ls (without the -exec switch)
Or even:
ls -lR
With recent shells (zsh, ksh93 and bash4) you could even do it all in shell without external commands like find/ls :)
Regards
Dimitre
-- http://www.freelists.org/webpage/oracle-l This email was received from the INTERNET and scanned by the Government Secure Intranet anti-virus service supplied by Cable&Wireless in partnership with MessageLabs. (CCTM Certificate Number 2007/11/0032.) In case of problems, please call your organisation’s IT Helpdesk. Communications via the GSi may be automatically logged, monitored and/or recorded for legal purposes. For the latest data on the economy and society consult National Statistics at http://www.statistics.gov.uk ********************************************************************************* Please Note: Incoming and outgoing email messages are routinely monitored for compliance with our policy on the use of electronic communications ********************************************************************************* Legal Disclaimer : Any views expressed by the sender of this message are not necessarily those of the Office for National Statistics ********************************************************************************* The original of this email was scanned for viruses by the Government Secure Intranet virus scanning service supplied by Cable&Wireless in partnership with MessageLabs. (CCTM Certificate Number 2007/11/0032.) On leaving the GSi this email was certified virus free. Communications via the GSi may be automatically logged, monitored and/or recorded for legal purposes. -- http://www.freelists.org/webpage/oracle-lReceived on Mon May 18 2009 - 05:14:49 CDT