file

Required Command-Line Mode = Configure

Use the file command to manage the debug dump files produced by the debug command, packet capture files, and the PCAP files produced by the tcpdump command.

Use the show file debug-dump command to display a list of available debug dump files. Note that debug dump files may be deleted automatically if disk usage is low.

The file command has the following syntax:

file
   debug-dump
      delete <filename>
      email <filename>
      upload <filename> <upload URL>
 
  pcap
      delete <filename>
      delete-all
      upload <filename> <upload URL>    tcpdump
      delete <filename>
      upload <filename> <upload URL>

The following table describes the arguments for the file command:

 

Argument

Description

debug-dump
   delete <filename>
   email <filename>
   upload <filename> <upload URL>

Deletes, emails, or uploads a sysdump file produced by the debug command as follows:

delete—Deletes a file. Type debug-dump delete ? to see a list of files available for deletion.
email—Sends a sysdump file to all email destinations configured to receive informational events (info) with the email command (email notify recipient <email address> class info).
upload—Sends a debug dump file to a remote host using FTP, TFTP, SCP, or SFTP. The format for the upload URL is as follows:

[protocol]://username[:password]@hostname/path/filename

pcap delete <filename>
   delete-all
   upload <filename> <upload URL>

Deletes or uploads a packet capture file produced by the pcap command as follows:

delete—Deletes a specified PCAP file.
delete-all—Deletes all PCAP files.
upload—Sends a PCAP file to a remote host using FTP, TFTP, SCP, or SFTP. The format for the upload URL is as follows:

[protocol]://username[:password]@hostname/path/filename

For example:

(config) # show files pcappcap_p1_2018_05_08_17_17.pcap

(config) # file pcap upload pcap_p1_2018_05_08_17_28.pcap scp://myNode@10.115.0.100/tftpboot/myName/.Password (if required): ***********

To upload the complete PCAP file without errors, delete the packet capture filter. For example:

(config) # no pcap alias p1

Refer to pcap.

tcpdump
   delete <filename>
   upload <filename> <upload URL>

Deletes or uploads a capture file produced by the tcpdump command as follows:

delete—Deletes a file. Type tcpdump delete ? to see a list of files available for deletion.
upload—Sends a tcpdump file to a remote host using FTP, TFTP, SCP, or SFTP. The format for the upload URL is as follows:

[protocol]://username[:password]@hostname/path/filename

Related Commands

The following table summarizes other commands related to the file command:

Task

Command

Displays the debug dump files stored on the node.

show files debug-dump

Displays PCAP files.

show files pcap

Displays filesystem information.

show files system

Displays detailed filesystem information.

show files system detail

Displays the tcpdump files stored on the nodes.

show files tcpdump