7.2.9 ls
List file/directory details.
Syntax
ls [ -h ] [ -l ] [ -r ] [ -t ] [ -a ]
[ -1 ] [ -s ] [ -d | --detail ]
[ name ]
[{ -w | --wallet } wallet-location ]
[{ -T | --trace } trace-level ]
[{ -j | --json } [ --compact ]]
Command Options
The options for the ls
command are:
-
name: Specifies the file or vault that is the subject of the command.
If no name is specified, the command lists all accessible vaults. If the name is a specific file, the command lists details for the specified file.
If the specified name is a vault name and the
-s
option is not specified, the command lists all of the files in the vault.A wildcard (
%
) is permitted when specifying either a vault name or file name. -
-h
: Displays output values in a human readable format (for example,10M
,22K
,300G
, and so on). This options is used in conjunction with the-l
option. -
-l
: Displays a longer listing including file size and creation date. -
-r
: Reverses the sort order. -
-t
: Sort by creation time instead of alphabetically. -
-a
: Displays hidden/special entries. -
-1
: List one entry on each line of output. -
-s
: Displays vault statistics instead of the vault contents.This option applies only when the name value specifies a vault name. The option is ignored when the name value specifies a file name.
-
-d
,--detail
: Displays a detailed listing of attributes. -
-w
,--wallet
: Optionally specifies the path to the Exascale wallet directory. -
-T
,--trace
: Optionally enables tracing, with the trace level (trace-level) set to1
(minimum tracing),2
(medium tracing), or3
(maximum tracing). If the trace level is not specified, then minimum tracing is enabled by default.The trace file is written to the first accessible location in the following list:
-
If the
$ADR_BASE
environment variable is set:$ADR_BASE/diag/EXC/xsh_<user-name>/<host-name>/trace/xsh_<date>.trc
/var/log/oracle/diag/EXC/xsh_<user-name>/<host-name>/trace/xsh_<date>.trc
/tmp/diag/EXC/xsh_<user-name>/<host-name>/trace/xsh_<date>.trc
-
-
-j
,--json
: Displays the output in JSON format. -
--compact
: Displays JSON formatted output in a compact format, without white space and line breaks.
Examples
Example 7-18 List all Exascale vaults
The following example lists all vaults visible to the Exascale user associated with the XSH command invocation.
$ xsh ls
Example 7-19 List the contents of an Exascale vault
The following example lists the files contained in the @my-data
vault.
$ xsh ls @my-data
Example 7-20 List the specific details about contents of an Exascale vault
The following example lists the files contained in the @my-data
vault. The command displays a detailed (long) listing that includes hidden files. The output is sorted according to the file creation time and displayed in reverse order (oldest first).
# xsh ls -alrt @my-data
583421952 Mar 10 14:57:34 2025 @my-data/EXA1-82B1CA80638E4F86BF2E4B3EABC7B6E7/data.ocr
20971520 Mar 10 14:57:41 2025 @my-data/EXA1-82B1CA80638E4F86BF2E4B3EABC7B6E7/vfile1
2048 Mar 10 15:01:53 2025 @my-data/EXA1-82B1CA80638E4F86BF2E4B3EABC7B6E7/DB1/PASSWORD/pwdDB1.42A5F9E0
175292416 Mar 10 15:02:00 2025 @my-data/EXA1-82B1CA80638E4F86BF2E4B3EABC7B6E7/DB1/CONTROLFILE/Current.OMF.253F31EB
4294967808 Mar 10 15:02:02 2025 @my-data/EXA1-82B1CA80638E4F86BF2E4B3EABC7B6E7/DB1/ONLINELOG/group_1.OMF.52326749
4294967808 Mar 10 15:02:04 2025 @my-data/EXA1-82B1CA80638E4F86BF2E4B3EABC7B6E7/DB1/ONLINELOG/group_2.OMF.3628C85F
17179877376 Mar 10 15:02:06 2025 @my-data/EXA1-82B1CA80638E4F86BF2E4B3EABC7B6E7/DB1/DATAFILE/SYSTEM.OMF.05DAA9B3
7964991488 Mar 10 15:02:08 2025 @my-data/EXA1-82B1CA80638E4F86BF2E4B3EABC7B6E7/DB1/DATAFILE/SYSAUX.OMF.3EFADCA5
...
Parent topic: XSH Command Reference