ls

ls file_name

Description

Lists all configuration, policy, and if configured, core dump files in the system.

Syntax Description

file_name Lists all the files that match the wildcard.

Default

N/A.

Usage Guidelines

When you use issue this command without any options, the output displays all of the configuration and policy files stored on the switch.

When you configure and enable the switch to send core dump (debug) information to the internal memory, specify the internal memory location /usr/local/tmp to display the core dump files stored internally. For more information about core dump files, see Core Dump Files.

When you specify the file-name option, the output displays all of the files that fit the wildcard criteria.

Understanding the Output

Output from this command includes the following:
  • The first column displays the file permission using the following ten place holders:
    • The first place holder displays - for a file.
    • The next three place holders display r for read access and w for write access permission for the file owner.
    • The following three place holders display r for read access permission for members of the file owner‘s group.
    • The last three place holders display r for read access for every user that is not a member of the file owner‘s group.
  • The second column displays how many links the file has to other files or directories.
  • The third column displays the file owner.
  • The remaining columns display the file size, date and time the file was last modified, and the file name.

Core Dump Files

Core dump files have a .gz file extension. The file name format is: core.process-name.pid.gz where process-name indicates the name of the process that failed and pid is the numerical identifier of that process.

When the switch has not saved any debug files, no files appear. For information about configuring and sending core dump information to internal memory or a USB 2.0 storage device, see the configure debug core-dumps and save debug tracefiles memorycard commands.

For more detailed information about core dump files, see Troubleshooting section in the ExtremeXOS 32.2 User Guide .

Example

The following command displays a list of all current configuration and policy files in the system:

ls

The following is sample output from this command:

total 424
-rw-r--r--    1 root     root           50 Jul 30 14:19 hugh.pol
-rw-r--r--    1 root     root        94256 Jul 23 14:26 hughtest.cfg
-rw-r--r--    1 root     root       100980 Sep 23 09:16 megtest.cfg
-rw-r--r--    1 root     root           35 Jun 29 06:42 newpolicy.pol
-rw-r--r--    1 root     root       100980 Sep 23 09:17 primary.cfg
-rw-r--r--    1 root     root        94256 Jun 30 17:10 roytest.cfg

The following command displays a list of all current configuration and policy files on a removable storage device:

ls /usr/local/ext

The following is sample output from this command:

-rwxr-xr-x    1 root     0        15401865 Mar 30 00:03 onie-11.2.0.13.xos
-rwxr-xr-x    1 root     0              10 Mar 31 09:41 test-1.pol
-rwxr-xr-x    1 root     0              10 Apr  4 09:15 test.pol
-rwxr-xr-x    1 root     0              10 Mar 31 09:41 test_1.pol
-rwxr-xr-x    1 root     0          223599 Mar 31 10:02 v11_1_3.cfg

The following command displays a list of all configuration and policy files with a file name beginning with the letter “a:”

(debug) BD-12804.1 # ls a*

Following is sample output from this command:

-rw-r--r--    1 root     0            2062 Jan  6 09:11 abc
-rw-rw-rw-    1 root     0            1922 Jan  7 02:19 abc.xsf
1k-blocks      Used Available Use%
16384       496     15888   3%

The following command displays a list of all .tgz files:

ls /usr/local/tmp/*.tgz

Following is sample output from this command:

-rwxr-xr-x    1 root     0           79076 Jan  6 09:47 old_traces.tgz
1k-blocks      Used Available Use%
49038       110     48928   0%

History

This command was first available in ExtremeXOS 10.1.

The memorycard option was added in ExtremeXOS 11.0.

The internal-memory option was added in ExtremeXOS 11.4.

The file-name option was added in ExtremeXOS 12.2.

Support for USB 2.0 storage devices was added in ExtremeXOS 12.5.3.

Pathname support was added in ExtremeXOS 15.5.1.

Platform Availability

This command is available on ExtremeSwitching X435, X440-G2, X450-G2, X460-G2, X465, X590, X620, and X695 series switches.