Re: Removing downloaded Oracle software

From: Ian Cary <ian.cary_at_ons.gsi.gov.uk>
Date: Mon, 18 May 2009 10:16:04 +0100
Message-ID: <OF0EF12499.9AC055E4-ON802575BA.0032274D-802575BA.0032E8FE_at_ons.gsi.gov.uk>



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

Cheers,

Ian

|---------+----------------------------->

| | pythianbrinsmead_at_g|
| | mail.com |
| | Sent by: |
| | oracle-l-bounce_at_fr|
| | eelists.org |
| | |
| | |
| | 17/05/2009 22:11 |
| | Please respond to |
| | pythianbrinsmead |
| | |
|---------+-----------------------------> >--------------------------------------------------------------------------------------------------------------| | | | To: cemail_219_at_hotmail.com | | cc: oracle-l_at_freelists.org | | Subject: Re: Removing downloaded Oracle software | >--------------------------------------------------------------------------------------------------------------|

Sometimes a little bit of paranoia can be very healthy.

The simple answer is "rm -rf", as we have heard a few times already.

If you are paranoid (i.e., "careful") you could consider a two stage approach similar to this:

#  find  /directory/to/be/deleted -exec ls -ld {} \; #  find  /directory/to/be/deleted -exec rm -f {} \;

The first command lists EVERY file that is doing to be deleted, allowing you to inspect the list and make sure there is nothing "bad" there.

The second command removes the files.  (Actually, as written, it will delete ONLY files, not directories, but this should give the idea.)

My preference is to use a command-line editor to change the first command to the second, as that way I can be sure that the only difference is the 'ls' command versus the 'rm' command.  The thing most likely to kill you is going to be a mistype in the directory name, after all.  Consider, for example, the difference between "rm -rf ./*" and "rm -rf . /*" -- the difference is only a single keystroke.  And a bare-metal recovery.

On Fri, May 15, 2009 at 8:34 AM, J. Dex <cemail_219_at_hotmail.com> wrote: I am nervous about doing this since it is Linux versus other OS.  What is the correct command to use to remove a directory and all of the files that fall under that directory without receiving questions back about whether or not want to remove various files within the that directory?   In other words, using the example below, I want to remove the "directory_to_be_removed" including any files that are in it without having to respond yes repeatedly?   The directory being removed is actually downloaded Oracle software from CD (but not the location where the install of the software itself is actually located at). goes with you. Get it on your BlackBerry or iPhone.

--
Cheers,
-- Mark Brinsmead Groupived 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.
†Ûiÿü0ÁúÞzX¬¶Ê+ƒün– {ú+iÉ^
Received on Mon May 18 2009 - 04:16:04 CDT

Original text of this message