Vyatta NOS documentation

Learn how to install, configure, and operate Vyatta Network Operating System (Vyatta NOS), which helps to drive our virtual networking and physical platforms portfolio.

show file <file>

Displays information about a file or directory.

show file file
file
A file or directory about which to display information.

Operational mode

Use this command to display information about a file or directory.

This command is optimized for configuration files and directories in that command completion refers to the /config directory of all known system images. For example, running://config/ indicates the /config directory of the currently running system, and test-image1://config/ indicates the /config directory of an image called test-image1. If needed, however, any other location within the file system can be specified.

Different information is displayed for various file types, as shown in the following table.

Table 1. Types of information displayed for various file types
File Type Information Displayed
Directory Directory contents
Text file Information about the file and file contents
Packet capture file (*.pcap) Information about the file and file contents in the form of a packet capture from tshark
Binary file Information about the file and file contents in the form of a hexadecimal dump

The following example shows how to display the contents of the /config directory on the currently running system.

vyatta@vyatta:~$ show file running://config
########### DIRECTORY LISTING ###########
total 36K
drwxrwsr-x 1 root 4.0K Mar 21 17:21 archive/
drwxrwsr-x 1 root 4.0K Mar 21 07:56 auth/
drwxrwsr-x 1 root 4.0K Mar 21 07:56 scripts/
drwxrwsr-x 1 root 4.0K Mar 21 07:56 support/
drwxr-sr-x 1 root 4.0K Mar 21 07:57 url-filtering/
drwxrwsr-x 1 root 4.0K Mar 21 07:56 user-data/
-rwxrwxr-x 1 root 1.9K Mar 21 17:21 config.boot
-rwxrwxr-x 1 root 4.2K Mar 20 17:14 webgui2_default_config.boot
vyatta@vyatta:~$

This example shows how to display partial contents of the /tmp/test1.pcap file on the currently running system.

vyatta@vyatta:~$ show file running://tmp/test1.pcap
########### FILE INFO ###########
Binary File: 
  Permissions: -rw-------
  Owner:        root
  Size:         35K
  Modified:     Apr 24 19:41
  Description:  tcpdump capture file (little-endian) - 
version 2.4 (dataplane, capture length 65535)
 
########### FILE DATA ###########
1   0.000000 192.168.56.101 -> 192.168.56.1 SSH Encrypted response 
packet len=128
  2   0.000155 192.168.56.1 -> 192.168.56.101 TCP 54566 > ssh [ACK] 
Seq=1 Ack=129 Win=1002 Len=0 TSV=186250939 TSER=21591709
  3   0.259966 192.168.56.101 -> 192.168.56.1 SSH Encrypted response 
packet len=48
  4   0.260216 192.168.56.1 -> 192.168.56.101 TCP 54566 > ssh [ACK] 
Seq=1 Ack=177 Win=1002 Len=0 TSV=186251199 TSER=21591735
...

This example shows how to display partial contents of the /config/r1.tar file on the currently running system.

vyatta@vyatta:~$ show file running://config/r1.tar
File Name: running://config/r1.tar
Binary File: 
  Permissions: -rwxrwxr-x
  Owner:        vyatta
  Size:         20K
  Modified:     Feb 6 23:09
  Description:  POSIX tar archive (GNU)
 
########### FILE DATA ###########
00000000  72 31 2f 00 00 00 00 00  00 00 00 00 
00 00 00 00  |r1/.............|
00000010  00 00 00 00 00 00 00 00  00 00 00 
00 00 00 00 00  |................|
*
...