ASMCMD is a command-line utility that you can use to easily view and manipulate files and directories within Automatic Storage Management (ASM) disk groups. It can list the contents of disk groups, perform searches, create and remove directories and aliases, display space utilization, and more.
Table 20-1 Summary of ASM Commands
Command | Description |
---|---|
cd | Changes the current directory to the specified directory. |
du | Displays the total disk space occupied by ASM files in the specified ASM directory and all its subdirectories, recursively. |
exit | Exits ASMCMD. |
find | Lists the paths of all occurrences of the specified name (with wildcards) under the specified directory. |
help | Displays the syntax and description of ASMCMD commands. |
ls | Lists the contents of an ASM directory, the attributes of the specified file, or the names and attributes of all disk groups. |
lsct | Lists information about current ASM clients. |
lsdg | Lists all disk groups and their attributes. |
mkalias | Creates an alias for a system-generated filename. |
mkdir | Creates ASM directories. |
pwd | Displays the path of the current ASM directory. |
rm | Deletes the specified ASM files or directories. |
rmalias | Deletes the specified alias, retaining the file that the alias points to. |
he asmcmd utility supports all common Linux commands:
ASMCMD> ls -alt -- list directory contents
ASMCMD> cd -- change directory
ASMCMD> mkdir -- create (make)directory
ASMCMD> du -- display directory space
ASMCMD> find -- standard UNIX find command
ASMCMD> rm -- remove file/directory
ASMCMD> lsdg -- list diskgroups
ASMCMD> pwd -- display current directory
Plus, we see some Oracle-only asmcmd commands:
ASMCMD> lsct -- list all connected Oracle instances