Translate

Sunday, 12 August 2012

Using find Command in ASM


Purpose

Displays the absolute paths of all occurrences of the specified name pattern (with wildcards) in a specified directory and its subdirectories.

Syntax and Description


find [-t type] dir_name name_pattern


This command searches the specified directory and all subdirectories under it in the directory tree for the supplied name_pattern. The value that you use forname_pattern can be a directory name or a filename, and can include wildcard characters. See "Wildcard Characters".


In the output of the command, directory names are suffixed with the slash character (/) to distinguish them from filenames.


You use the -t flag to find all the files of a particular type (specified as type). For example, you can search for control files by specifying type asCONTROLFILE. Valid values for type are the following:


CONTROLFILE

DATAFILE

ONLINELOG

ARCHIVELOG

TEMPFILE

BACKUPSET

DATAFILE

PARAMETERFILE

DATAGUARDCONFIG

FLASHBACK

CHANGETRACKING

DUMPSET

AUTOBACKUP

XTRANSPORT


These are the type values from the type column of the V$ASM_FILE view.


Examples


The following example searches the dgroup1 disk group for files that begin with 'UNDO'.


ASMCMD> find +dgroup1 undo*

+dgroup1/sample/DATAFILE/UNDOTBS1.258.555341963

+dgroup1/sample/DATAFILE/UNDOTBS1.272.557429239

The following example returns the absolute path of all the control files in the +dgroup1/sample directory.

ASMCMD> find -t CONTROLFILE +dgroup1/sample *

+dgroup1/sample/CONTROLFILE/Current.260.555342185

+dgroup1/sample/CONTROLFILE/Current.261.555342183

No comments:

Post a Comment