file list
Syntax
file list <detail | recursive> <path>
Description
Display a list of files on the local router or switch.
Options
none | Display a list of files in the default directory. The default directory is the home directory of the user logged in to the router or switch. |
detail | (Optional) Display
detailed information about the files. The output is similar to what
is displayed by the Linux |
recursive | (Optional) Display detailed information about the files in the directory and all subdirectories below it. |
path | (Optional) List the files in a specified directory path. The
path name cannot contain any special characters ( |
Additional Information
To view available directories, enter
a space and then a slash (/) after the file list
command.
To view files within a specific directory, include a slash followed
by the directory and, optionally, subdirectory name after the file list
command.
Required Privilege Level
maintenance
Sample Output
file list
The following command lists the contents of the /var/tmp directory.
user@host> file list /var/tmp /var/tmp: trace_debug package.log pics/ downloads/
file list (detailed)
The following command lists detailed information about the contents of the /var/tmp directory.
user@host> file list /var/tmp detail /var/tmp/: total blocks: 4276224 -rw-r--r-- 1 user group 1362 Oct 16 11:11 trace_debug -rw-r--r-- 1 user group 108 Aug 9 2016 package.log drwxrwxrwx 2 user group 512 Jun 30 2016 pics/ drwxr-xr-x 3 user group 512 Aug 9 2016 downloads/ total files: 2
file list (recursive)
The following command lists detailed information about the contents of the /var/tmp directory and all subdirectories below it.
user@host> file list /var/tmp recursive /var/tmp/: total blocks: 4276224 -rw-r--r-- 1 user group 1362 Oct 16 11:11 trace_debug -rw-r--r-- 1 user group 108 Aug 9 2016 package.log drwxrwxrwx 2 user group 512 Jun 30 2016 pics/ drwxr-xr-x 3 user group 512 Aug 9 2016 downloads/ total files: 2 /var/tmp/pics: total blocks: 5120461 -rw-r--r-- 1 user group 1910 Oct 15 2016 image3.png -rw-r--r-- 1 user group 1852 Oct 15 2016 image2.png -rw-r--r-- 1 user group 1310 Aug 9 2016 image1.png total files: 3 /var/tmp/downloads: total blocks: 24 -rw-r--r-- 1 user group 108 Aug 21 2016 package2.log -rw-r--r-- 1 user group 108 Aug 9 2016 package1.log drwxr-xr-x 2 user group 512 Aug 9 2016 sub-download/ total files: 2 /var/tmp/downloads/sub-download: total blocks: 16 total files: 0
Release Information
Command introduced before Junos OS Release 7.4.