File Commands
Revised: September 29, 2020
This chapter contains the following file commands:
file get cert
file get cert {LSC | MIC | MIC-CA} {username} {password} {server} {target folder}
Syntax Description
LSC | MIC | MIC-CA |
Certificate type to be downloaded. |
username |
SCP server username |
password |
SCP server password. |
server |
Target SCP server |
target folder |
Target folder in SCP server, where cert needs to be kept. |
Command Default
No default behavior or values.
Command History
|
|
IX 8.0.2.2 |
This command was introduced. |
IX 8.1.0 |
MIC-CA option added |
Usage Guidelines
Use this command to download LSC/MIC/MIC-CA certificate from IX5000 to SCP server. You can also enter help in the command string:
help file get cert
Examples
admin:file get cert LSC user pass server /tmp/
Uploading LSC to server...DONE
file get log ftp
file get log ftp { word word word | A.B.C.D word [detail]}
Syntax Description
word |
Required. Username of the FTP. |
word |
Required. Password of the FTP account. |
word | A.B.C.D |
Required. Destintion as a hostname or dotted IP address. |
word |
Required. Specific file(s) to get. The file spec may contain wildcards (*). |
detail |
Optional. Displays transfer status. |
Command Default
No default behavior or values.
Command History
|
|
1.6.0 |
This command was introduced. |
Usage Guidelines
Use this command to transfer the log file(s) to an external server using FTP. A directory path may be appended to the destination. For example: ftpserver/dir1/dir2 - dir1 and dir2 directories must exist and have write access. You can also enter help in the command string:
help file get log ftp
Note
The upload transfer rate of the file is artificially limited. The rate is based of the Cisco Unified CM quality setting.
To do an anonymous FTP with no password, use a pair of quotes for the password. For example:
utils logs ftp anonymous "" ftpserver
Examples
admin:file get log ftp anonymous "" ftpserver secm/*.log detail
rate limited to 500K bytes per second
File (*.log) sent successfully
admin:file get log ftp anonymous "" ftpserver/mydir cli/capture/netCapture.cap
rate limited to 500K bytes per second
File (netCapture.cap) sent successfully
file get log scp
file get log scp { word word word | A.B.C.D word [detail]}
Syntax Description
word |
Required. Username of the SCP. |
word |
Required. Password of the SCP account. |
word | A.B.C.D |
Required. Destintion as a hostname or dotted IP address. |
word |
Required. Specific file(s) to get. The file spec may contain wildcards (*). |
detail |
Optional. Displays transfer status. |
Command Default
No default behavior or values.
Command History
|
|
1.6.0 |
This command was introduced. |
Usage Guidelines
Use this command to transfer the log file(s) to an external server using SCP. A directory path may be appended to the destination. For example: scpserver/dir1/dir2 - dir1 and dir2 directories must exist and have write access. You can also enter help in the command string:
help file get log scp
Note
The upload transfer rate of the file is artificially limited. The rate is based of the Cisco Unified CM quality setting.
Examples
admin:file get log scp testuser testpass scpserver secm/*.log detail
rate limited to 500K bytes per second
File (*.log) sent successfully
admin:file get log scp testuser testpass scpserver/mydir cli/capture/netCapture.cap
rate limited to 500K bytes per second
File (netCapture.cap) sent successfully
file get log sftp
file get log sftp { word word word | A.B.C.D word [detail]}
Syntax Description
word |
Required. Username of the SFTP. |
word |
Required. Password of the SFTP account. |
word | A.B.C.D |
Required. Destintion as a hostname or dotted IP address. |
word |
Required. Specific file(s) to get. The file spec may contain wildcards (*). |
detail |
Optional. Displays transfer status. |
Command Default
No default behavior or values.
Command History
|
|
1.6.0 |
This command was introduced. |
Usage Guidelines
Use this command to transfer the log file(s) to an external server using SFTP. A directory path may be appended to the destination. For example: sftpserver/dir1/dir2 - dir1 and dir2 directories must exist and have write access. You can also enter help in the command string:
Note
The upload transfer rate of the file is artificially limited. The rate is based of the Cisco Unified CM quality setting.
To do an anonymous SFTP with no password, use a pair of quotes for the password. For example:
utils logs sftp anonymous "" sftpserver
Examples
admin:file get log sftp testuser testpass sftpserver secm/*.log detail
rate limited to 500K bytes per second
File (*.log) sent successfully
admin:file get log sftp anonymous "" sftpserver/mydir cli/capture/netCapture.cap
rate limited to 500K bytes per second
File (netCapture.cap) sent successfully
file list log
file list log file-spec [ remote ] [ page | detail | reverse | [ date | size ]]
Syntax Description
file-spec |
Required. File to view. You can use * as a wildcard. |
page |
Optional. Pause output. |
detail |
Optional. Show detailed listing. |
reverse |
Optional. Sort in reverse order. |
date |
Optional. Sort by date. |
size |
Optional. Sort by size. |
remote |
Optional. Remote log file to list. |
Command Default
No default behavior or values.
Command History
|
|
1.5 |
This command was introduced. |
Usage Guidelines
Use this command to list logging files.
Examples
admin:file list log sysop detail
24 Apr,2009 01:26:06 4 sysop.bin
24 Apr,2009 01:23:34 67 sysop00000.log
24 Apr,2009 17:30:49 7,324 sysop00001.log
dir count = 0, file count = 3
file list nvboot
file list nvboot f ile-spec [ page | detail | reverse | date | size ]
Syntax Description
file-spec |
Required. File to view. You can use * as a wildcard. |
page |
Optional. Pause output. |
detail |
Optional. Show detailed listing. |
reverse |
Optional. Sort in reverse order. |
date |
Optional. Sort by date. |
size |
Optional. Sort by size. |
Command Default
No default behavior or values.
Command History
|
|
1.5 |
This command was introduced. |
Usage Guidelines
Use this command to list NV bootlog files.
Examples
admin:file list nvboot * detail
09 Nov,2008 03:59:56 46,150 cfsync.log
09 Nov,2008 03:59:57 34,858 cfupgrade.log
09 Nov,2008 04:00:01 132,641 rc.log
09 Nov,2008 03:59:58 23,152 uiNotification.log
28 Oct,2008 17:55:48 34,604 upgPeripheral.log
dir count = 0, file count = 5
file tail log
file tail log { file-spec [ hex ]}
Syntax Description
file-spec |
Required. File to tail. |
hex |
Optional. Hexadecimal. |
Command Default
No default behavior or values.
Command History
|
|
1.5 |
This command was introduced. |
Usage Guidelines
Use this command to tail the contents of a file in the logging area. Press Control-C to stop the command.
Examples
admin:file tail log sysop/sysop00001.log
file tail nvboot
file tail nvboot { file-spec [ hex ]}
Syntax Description
file-spec |
Required. File to tail. |
hex |
Optional. Hexadecimal. |
Command Default
No default behavior or values.
Command History
|
|
1.5 |
This command was introduced. |
Usage Guidelines
Use this command to tail the contents of a file in the NV bootlog area. Press Control-C to stop the command
Examples
admin:file tail nvboot rc.log
Starting keyExchange... DONE
Starting HDMI Monitor Main Rx...
file /nv/bootlog/cfsync.log trimmed to 985 lines
file /nv/bootlog/cfupgrade.log trimmed to 995 lines
file /nv/bootlog/upgPeripheral.log left at 993 lines
file /nv/bootlog/uiNotification.log trimmed to 999 lines
file /nv/bootlog/rc.log trimmed to 3996 lines
file view log
file view log { file-spec [ hex ]}
Syntax Description
file-spec |
Required. Log file to view. |
hex |
Optional. Hexadecimal. |
Command Default
No default behavior or values.
Command History
|
|
1.5 |
This command was introduced. |
TX 6.0 and CTS 1.10 |
Added the ability to view the sysop log with the file view log sysop/sysop00000.log iteration of this command. |
Usage Guidelines
Use this command to view the contents of a file in the logging area. To view the data, use the following keystroke controls:
- Enter key; Move forward one line
- Space bar: Move forward one page
- b: Move backward one page
- s : Move to the start of the file
- e: Move to the end of the file
- q: Quit the command
Examples
admin:file view log sysop/sysop00001.log
2008-10-27 22:19:04,261 - admin CLI login from 191.74.232.125:43776
2008-10-27 22:19:06,651 - admin CLI logout (forced) from 191.74.232.125:43776
2008-10-27 22:19:43,262 - build UI version mismatch. phone:1.0.7, cts:1.0.8
2008-10-27 22:20:08,686 - CTL updated
2008-10-27 22:46:07,205 - Local Hold
2008-10-27 22:46:08,412 - Resume Call
More data : enter, space, b, s, e or q
file view nvboot
file view nvboot { file-spec [ hex ]}
Syntax Description
file-spec |
Required. File to view. |
hex |
Optional. Hexadecimal. |
Command Default
No default behavior or values.
Command History
|
|
1.5 |
This command was introduced. |
Usage Guidelines
Use this command to view the contents of a file in the NV bootlog area. To view the data, use the following keystroke controls:
- Enter key; Move forward one line
- Space bar: Move forward one page
- b: Move backward one page
- s : Move to the start of the file
- e: Move to the end of the file
- q: Quit the command
Examples
admin:file view nvboot rc.log
Sun Jan 1 00:00:00 GMT 2006
Starting /usr/sbin/syslogd
More data : enter, space, b, s, e or q