Command Line Interface Guide for Cisco Unified Communications Solutions, Release 9.1(1)
File Commands
Downloads: This chapterpdf (PDF - 1.33MB) The complete bookPDF (PDF - 3.86MB) | Feedback

File Commands

File Commands

file check

This command checks the /usr directory tree to see whether files or directories have been added, removed, or changed in size since the last fresh installation or upgrade and shows the results.

file check [detection-size-kb]

Syntax Description

Parameters Description
detection-size-kb

Specifies the minimum file size change that is required for the command to display the file as changed.

Default value: 100 KB.

Command Modes

Administrator (admin:)

Usage Guidelines

The command notifies you about a possible impact to system performance and asks you whether you want to continue.  The display includes both deleted and new files.


Caution


Because this command can affect system performance, Cisco recommends that you run the command during off-peak hours.


Requirements

Command privilege level: 0

Allowed during upgrade: No

Applies to: Unified Communications Manager, IM and Presence service on Unified Communications Manager, Cisco Unity Connection

file delete*

file delete

This command deletes a log on the active or inactive side.

file delete { activelog | inactivelog | install } file-spec [detail] [noconfirm]

Syntax Description

Parameters Description
activelog

Specifies a log on the active side.

inactivelog

Specifies a log on the inactive side.

install

Specifies an installation log.

file-spec

Specifies the path and filename of the log or logs to delete (includes install log files).

detail

Shows a listing of deleted files with the date and time.

noconfirm

Deletes files without asking you to confirm each deletion.

Command Modes

Administrator (admin:)

Usage Guidelines

You get prompted for confirmation after you enter the command. You cannot delete directories or files that are in use.


Caution


You cannot recover a deleted file, but you may be able to with The Disaster Recovery System.


Requirements

Command privilege level: 1

Allowed during upgrade: Yes

Applies to: Unified Communications Manager, IM and Presence service on Unified Communications Manager, Cisco Unity Connection

file delete tftp

This command deletes a TFTP file.

file delete tftp file-spec [detail] [noconfirm]

Syntax Description

Parameters Description
file-spec

Represents the TFTP file name.

detail

Shows a listing of deleted files with the date and time.

noconfirm

Deletes files without asking you to confirm each deletion.

Command Modes

Administrator (admin:)

Usage Guidelines

You get prompted for confirmation after you enter the command. You cannot delete directories or files that are in use.


Caution


You cannot recover a deleted file, but you may be able to with The Disaster Recovery System.


Requirements

Command privilege level: 1

Allowed during upgrade: Yes

Applies to:Unified Communications Manager, IM and Presence service on Unified Communications Manager, Cisco Unity Connection

file delete dir tftp

This command deletes the TFTP directory.

file delete dir tftp dir-name [detail]

Syntax Description

Parameters Description
dir-name

Specifies the TFTP directory to delete.

detail

Shows a listing of deleted files with the date and time.

Command Modes

Administrator (admin:)

Usage Guidelines

You get prompted for confirmation after you enter the command. You cannot delete directories or files that are in use.

Caution


You cannot recover a deleted file, but you may be able to with The Disaster Recovery System.


Requirements

Command privilege level: 1

Allowed during upgrade: Yes

Applies to: Unified Communications Manager, IM and Presence service on Unified Communications Manager, Cisco Unity Connection

file dump*

file dump

This command dumps the contents of a log, a page at a time.

file dump { activelog | inactivelog | install } file-spec [hex] [recent] [ regexp expression ]

Syntax Description

Parameters Description
activelog

Specifies a log on the active side.

inactivelog

Specifies a log on the inactive side.

install

Specifies an installation log.

file-spec

Represents the log file to dump.

hex

Shows output in hexadecimal.

recent

Dumps the most recently changed file in the directory.

regexp expression

Displays only the lines in the file that match the regular expression expression.

Command Modes

Administrator (admin:)

Requirements

Command privilege level: 1

Allowed during upgrade: Yes

Applies to: Unified Communications Manager, IM and Presence service on Unified Communications Manager, Cisco Unity Connection

Example

This command dumps contents of file _cdrIndex.idx.
admin: file dump activelog cm/cdr/_cdrIndex.idx

file dump sftpdetails

This command specifies the list of files that can be dumped in the SFTP context and allows you to choose which file to dump.

file dump sftpdetails

Command Modes

Administrator (admin:)

Usage Guidelines

Enter a to dump all SFTP-related files. Enter q to exit this command.

Requirements

Command privilege level: 0

Allowed during upgrade: Yes

Applies to: Unified Communications Manager, Cisco Unity Connection

file dump tftp

This command dumps the contents of a TFTP file to the screen, a page at a time.

file dump tftp file-spec [page] [detail] [hex]

Syntax Description

Parameters Description
file-spec

Represents the name of a TFTP file.

page

Displays the output one screen at a time.

detail

Displays the listing with the date and time.

hex

Displays the output in hexadecimal.

Command Modes

Administrator (admin:)

Usage Guidelines


Note


file-spec must resolve to a single file.


Requirements

Command privilege level: 0

Allowed during upgrade: Yes

Applies to: Unified Communications Manager, Cisco Unity Connection

file fragmentation sdi*

file fragmentation sdi

This command shows file fragmentation information about SDI log files.

file fragmentation sdi most { fragmented | recent } [number]

Syntax Description

Parameters Description
most fragmented

Represents the most fragmented log files.

most recent

Represents the most recent logs files.

number

Represents the number of files to list.

Command Modes

Administrator (admin:)

Requirements

Command privilege level: 1

Allowed during upgrade: Yes

Applies to: Unified Communications Manager, IM and Presence service on Unified Communications Manager, Cisco Unity Connection

file fragmentation sdi file

This command shows file fragmentation information about an SDI log file.

file fragmentation sdi file filename [verbose]

Syntax Description

Parameters Description
filename

Represents the SDI log file name.

verbose

Shows more detailed information on the screen.

Command Modes

Administrator (admin:)

Requirements

Command privilege level:1

Allowed during upgrade: Yes

Applies to: Unified Communications Manager, IM and Presence service on Unified Communications Manager, Cisco Unity Connection

file fragmentation sdi all

This command shows file fragmentation information about all SDI log files in the directory.

file fragmentation sdi all filename

Syntax Description

Parameters Description
filename

Specifies the SDI log file name for which you want to show all fragmentation details.

Command Modes

Administrator (admin:)

Requirements

Command privilege level: 1

Allowed during upgrade: Yes

Applies to: Unified Communications Manager, IM and Presence service on Unified Communications Manager, Cisco Unity Connection

file fragmentation sdl*

file fragmentation sdl

This command shows file fragmentation information about the most fragmented SDL log files.

file fragmentation sdl most { fragmented | recent } [number]

Syntax Description

Parameters Description
most fragmented

Represents the most fragmented log files.

most recent

Represents the most recent log files.

number

Represents the number of files to list.

Command Modes

Administrator (admin:)

Requirements

Command privilege level: 1

Allowed during upgrade: Yes

Applies to: Unified Communications Manager, IM and Presence service on Unified Communications Manager, Cisco Unity Connection.

file fragmentation sdl file

This command displays file fragmentation information about an SDL log file.

file fragmentation sdl file filename [verbose]

Syntax Description

Parameters Description
filename

Represents the file name of the SDL log file.

verbose

Shows more detailed information on the screen.

Command Modes

Administrator (admin:)

Requirements

Command privilege level: 1

Allowed during upgrade: Yes

Applies to: Unified Communications Manager, IM and Presence service on Unified Communications Manager, Cisco Unity Connection.

file fragmentation sdl all

This command shows file fragmentation information about all SDL log files in the directory.

file fragmentation sdl all filename

Syntax Description

Parameters Description
filename

Represents the file name for which you want to show all fragmentation details.

Command Modes

Administrator (admin:)

Requirements

Command privilege level: 1

Allowed during upgrade: Yes

Applies to: Unified Communications Manager, IM and Presence service on Unified Communications Manager, Cisco Unity Connection.

file get*

file get

This command sends a log to another system by using SFTP.

file get { activelog | inactivelog | install } file-spec [ reltime | abstime ] [ match regex ] [recurs] [compress]

Syntax Description

Parameters Description
activelog

Specifies a log on the active side.

inactivelog

Specifies a log on the inactive side.

install

Specifies an installation log.

file-spec

Specifies the name of the file to transfer.

reltime

The relative time period, specified in minutes | hours | days | weeks | months | time value

abstime

The absolute time period, specified as hh:mm:MM/DD/YY hh:mm:MM/DD/YY

match regex

Match a particular string in the filename, specified as regex.

recurs

Get all files, including subdirectories.

compress

Transfer files as compressed file.

tftp

Command Modes

Administrator (admin:)

Usage Guidelines

After the command identifies the specified files, you get prompted to enter an SFTP host, username, and password.

Requirements

Command privilege level: 0

Allowed during upgrade: Yes

Applies to: Unified Communications Manager, IM and Presence service on Unified Communications Manager, Cisco Unity Connection

Example

This example gets all files in the activelog operating system directory that match the string "plat."
admin: file get activelog platform match plat 
This example gets all operating system log files for a particular time period.
admin: file get activelog platform/log abstime 18:00:10/20/13 18:00:10/21/13 

file get salog

This command sends the partBsalog or salog directory to another system by using SFTP.

file get { partBsalog | salog } file-spec [ reltime | abstime ] [ match regex ] [recurs] [compress]

Syntax Description

Parameters Description
partBsalog

Specifies the partBsalog directory.

salog

Specifies the salog directory.

file-spec

Specifies the name of the file to transfer.

reltime

The relative time period, specified in minutes | hours | days | weeks | months | time value

abstime

The absolute time period, specified as hh:mm:MM/DD/YY hh:mm:MM/DD/YY

match regex

Match a particular string in the filename, specified as regex.

recurs

Get all files, including subdirectories.

compress

Transfer files as compressed file.

Command Modes

Administrator (admin:)

Usage Guidelines

After the command identifies the specified files, you get prompted to enter an SFTP host, username, and password.

Requirements

Command privilege level: 0

Allowed during upgrade: Yes

Applies to: Unified Communications Manager, Cisco Unity Connection

file get tftp

This command sends a TFTP file to another system by using SFTP.

file get tftp file-spec [ reltime | abstime ] [ match regex ] [recurs] [compress]

Syntax Description

Parameters Description
file-spec

Specifies the name of the TFTP file to transfer.

reltime

The relative time period, specified in minutes | hours | days | weeks | months | time value

abstime

The absolute time period, specified as hh:mm:MM/DD/YY hh:mm:MM/DD/YY

match regex

Match a particular string in the filename, specified as regex.

recurs

Get all files, including subdirectories.

compress

Transfer files as compressed file.

Command Modes

Administrator (admin:)

Usage Guidelines

After the command identifies the specified files, you get prompted to enter an SFTP host, username, and password.

Requirements

Command privilege level: 0

Allowed during upgrade: Yes

Applies to: Unified Communications Manager, Cisco Unity Connection

file list*

file list

This command lists the log files in an available log directory.

file list { activelog | inactivelog | install } file-spec [ page | detail | reverse ] [ date | size ]

Syntax Description

Parameters Description
activelog

Specifies a log on the active side.

inactivelog

Specifies a log on the inactive side.

install

Specifies an installation log.

file-spec

Specifies the name of the log file .

page

Shows the output one screen at a time.

detail

Shows a detailed listing with date and time.

reverse

Reverses the sort direction.

date

Sorts files by date.

size

Sorts files by size.

Command Modes

Administrator (admin:)

Usage Guidelines

Requirements

Command privilege level: 1

Allowed during upgrade: Yes

Applies to: Unified Communications Manager, IM and Presence service on Unified Communications Manager, Cisco Unity Connection

Example: Log Files with Details

This example lists operating system log files with details.
admin: file list activelog platform/log page detail
This example lists directories in CDR repository.
admin: file list activelog cm/cdr_repository
This example lists CDR files in a specified directory by size.
admin: file list activelog cm/cdr_repository/processed/20050812 size

file list salog

This command lists the partBsalog or salog directory.

file list { partBsalog | salog } file-spec [ page | detail | reverse ] [ date | size ]

Syntax Description

Parameters Description
partBsalog

Specifies the partBsalog log directory.

salog

Specifies the salog log directory.

file-spec

Specifies the path to the file or files to list.

page

Shows the output one screen at a time.

detail

Shows a detailed listing with date and time.

reverse

Reverses the sort direction.

date

Sorts files by date.

size

Sorts files by size.

Command Modes

Administrator (admin:)

Requirements

Command privilege level: 1

Allowed during upgrade: Yes

Applies to:Unified Communications Manager, Cisco Unity Connection

file list tftp

This command lists TFTP files.

file list tftp file-spec [ page | detail | reverse ] [ date | size ]

Syntax Description

Parameters Description
file-spec

Specifies the name of the TFTP file .

page

Shows the output one screen at a time.

detail

Shows a detailed listing with date and time.

reverse

Reverses the sort direction.

date

Sorts files by date.

size

Sorts files by size.

Command Modes

Administrator (admin:)

Requirements

Command privilege level: 0

Allowed during upgrade: Yes

Applies to: Unified Communications Manager, Cisco Unity Connection

file search*

file search

This command searches the content of a log and shows the matching lines a page at a time.

file search { activelog | inactivelog | install } file-spec [ reltime | abstime ] [ignorecase]

Syntax Description

Parameters Description
activelog

Specifies a log on the active side.

inactivelog

Specifies a log on the inactive side.

install

Specifies an installation log.

file-spec

Specifies the name of the file to search.

reltime

The relative time period, specified in minutes | hours | days | weeks | months | time value

abstime

The absolute time period, specified as hh:mm:MM/DD/YY hh:mm:MM/DD/YY

ignorecase

Ignores case in a search.

Command Modes

Administrator (admin:)

Usage Guidelines

Write the search term in the form of a regular expression, which is a special text string to describe a search pattern.

If the search term is found in only one file, the filename appears at the top of the output. If the search term is found in multiple files, each line of the output begins with the filename in which the matching line was found.

Requirements

Command privilege level: 0

Allowed during upgrade: Yes

file search tftp

This command searches the content of a TFTP file and shows the matching lines a page at a time.

file search tftp file-spec [ reltime | abstime ] [ignorecase]

Syntax Description

Parameters Description
file-spec

Specifies the name of the TFTP file to search.

reltime

The relative time period, specified in minutes | hours | days | weeks | months | time value

abstime

The absolute time period, specified as hh:mm:MM/DD/YY hh:mm:MM/DD/YY

ignorecase

Ignores case in a search.

Command Modes

Administrator (admin:)

Usage Guidelines

Write the search term in the form of a regular expression, which is a special text string to describe a search pattern.

If the search term is found in only one file, the filename appears at the top of the output. If the search term is found in multiple files, each line of the output begins with the filename in which the matching line was found.

Requirements

Command privilege level: 0

Allowed during upgrade: Yes

file tail*

file tail activelog

This command tails (prints the last few lines) of a log file.

file tail { activelog | inactivelog | install } filespec [hex] [lines] [ regexp expression ]

Syntax Description

Parameters Description
activelog

Specifies a log on the active side.

inactivelog

Specifies a log on the inactive side.

install

Specifies an installation log.

filespec

Specifies the path to the file. You can use the wildcard character, *, for filename as long as it resolves to one file.

hex

Show the listing in hexadecimal.

lines

Specifies the number of lines to display.

regexp expression

Tails log files that match expression

Command Modes

Administrator (admin:)

Requirements

Command privilege level: 1

Allowed during upgrade: Yes

Applies to: Unified Communications Manager, IM and Presence service on Unified Communications Manager, Cisco Unity Connection

Example

This example tails the operating system CLI log file.
admin: file tail activelog platform/log/cli00001.log

file tail tftp

This command tails (prints the last few lines) of a TFTP file.

file tail tftp filespec [detail] [hex] [lines]

Syntax Description

Parameters Description
filespec

Specifies the path to the file. You can use the wildcard character, *, for filename as long as it resolves to one file.

detail

Long listing with date and time

hex

Show the listing in hexadecimal.

lines

Specifies the number of lines to display.

Command Modes

Administrator (admin:)

Requirements

Command privilege level: 0

Allowed during upgrade: Yes

Applies to: Unified Communications Manager, Cisco Unity Connection

file view*

file view

This command shows the contents of log files.

file view { activelog | inactivelog | install } file-spec

Syntax Description

Parameters Description
activelog

Specifies a log file on the active side.

inactivelog

Specifies a log file on the inactive side.

install

Specifies an installation log file.

file-spec

Specifies the path to the file to view. You can use the wildcard character, *, as long as it resolves to one file.

Command Modes

Administrator (admin:)

Usage Guidelines


Caution


Do not use this command to view binary files because this can corrupt the terminal session.


Requirements

Command privilege level: 0

Allowed during upgrade: Yes

Applies to: Unified Communications Manager, IM and Presence Service on Unified Communications Manager, Cisco Unity Connection

Example

This example shows a particular CDR log on the active side.
admin: file view activelog /cm/cdr_repository/processed/20058012/{filename}

file view system-management-log

This command shows the contents of the Integrated Management Logs (IML).

file view system-management-log

Command Modes

Administrator (admin:)

Usage Guidelines


Caution


Do not use this command to view binary files because this can corrupt the terminal session.


Requirements

Command privilege level: 0

Allowed during upgrade: Yes

Applies to: Unified Communications Manager, Cisco Unity Connection

file view tftp

This command displays the contents of the installation log.

file view tftp file-spec

Syntax Description

Parameters Description
file-spec

Specifies the path to the file to view. You can use the wildcard character, *, as long as it resolves to one file.

Command Modes

Administrator (admin:)

Usage Guidelines


Caution


Do not use this command to view binary files because this can corrupt the terminal session.


Requirements

Command privilege level: 0

Allowed during upgrade: Yes

Applies to: Unified Communications Manager, Cisco Unity Connection