CTS-Manager CLI Command Reference Guide 1.5
CLI Command file

Table Of Contents

File Commands

file delete

file dump

file get

file list

file search

file tail

file view


File Commands


Revised: April 15, 2009, OL-19545-01

This chapter contains the following file commands:

file delete

file dump

file get

file list

file search

file tail

file view

file delete

file delete

activelog directory/filename [detail] [noconfirm]

inactivelog directory/filename [detail] [noconfirm]

install directory/filename [detail] [noconfirm]

Syntax Description

directory/filename

Specifies the path and filename of the file(s) to delete. You can use the wildcard character, *, for filename.

activelog

Specifies a log on the active side.

inactivelog

Specifies a log on the inactive side.

install

Specifies an installation log.

detail

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

noconfirm

Deletes files without asking you to confirm each deletion.


Command Modes

Admin

Command privilege level: 1

Allowed during upgrade: Yes

Command History

Release
Modifications

1.5

This command was first documented.


Usage Guidelines

This command deletes one or more files.


Caution You cannot recover a deleted file except, possibly, by using the Disaster Recovery System.

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

Examples

admin: file delete install install.log

file dump

file dump

activelog directory/filename [detail] [hex]

inactivelog directory/filename [detail] [hex]

install directory/filename [detail] [hex]

Syntax Description

directory/filename

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

filename

Specifies the filename of the file to dump.

activelog

directory/filename [detail] [hex]

inactivelog

Specifies a log on the inactive side.

install

Specifies an installation log.

detail

Displays listing with the date and time.

hex

Displays output in hexadecimal.


Command Modes

Admin

Command privilege level: 1 for logs

Allowed during upgrade: Yes

Command History

Release
Modifications

1.2

This command was first documented.


Usage Guidelines

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

To determine which files you can dump with the activelogdetails parameter, first enter the following command:

file list activelogdetails *

The output lists the filenames that you can dump.

Examples

This command dumps contents of file _cdrIndex.idx.

admin: file dump activelog cm/cdr/_cdrIndex.idx

file get

file get

activelog directory/filename [reltime] [abstime] [match] [recurs]

inactivelog directory/filename [reltime] [abstime] [match] [recurs]

install directory/filename [reltime] [abstime] [match] [recurs]

Syntax Description

directory/filename

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

activelog

Specifies a log on the active side.

inactivelog

Specifies a log on the inactive side

install

Specifies an installation log.

abstime

Absolute time period, specified as hh:mm:MM/DD/YY hh:mm:MM/DD/YY.

reltime

Relative time period, specified as minutes | hours | days | weeks | months value.

match

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

recurs

Get all files, including subdirectories.


Command Modes

Admin

Command privilege level: 0

Allowed during upgrade: Yes

Command History

Release
Modifications

1.2

This command was first documented.


Usage Guidelines

This command sends the file to another system by using SFTP.

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

Examples

This command gets all files in the activelog operating system directory that match the string "plat".

admin: file get activelog platform match plat

This command gets all operating system log files for a particular time period.

admin: file get activelog platform/log abstime 18:00:9/27/2005 18:00:9/28/2005

file list

file list

activelog directory [page] [detail] [reverse] [date | size]

inactivelog directory [page] [detail] [reverse] [date | size]

install directory [page] [detail] [reverse] [date | size]

tftp directory [page] [detail] [reverse] [date | size]

Syntax Description

activelog

Specifies a log on the active side

inactivelog

Specifies a log on the inactive side.

install

Specifies an installation log.

tftp

Specifies a TFTP file.

directory

Specifies the path to the directory to list. You can use a wildcard character, *, for directory as long as it resolves to one directory.

detail

Long listing with date and time.

date

Sort by date.

size

Sort by file size.

reverse

Reverse sort direction.

page

Displays the output one screen at a time.


Command Modes

Admin

Command privilege level: 1 for logs, 0 for TFTP files

Allowed during upgrade: Yes

Command History

Release
Modifications

1.2

This command was first documented.


Usage Guidelines

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

Examples

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 search

file search

activelog directory/filename reg-exp [abstime hh:mm:ss mm/dd/yyyy hh:mm:ss mm/dd/yyyy] [ignorecase] [reltime {days | hours | minutes} timevalue]

inactivelog directory/filename reg-exp [abstime hh:mm:ss mm/dd/yyyy hh:mm:ss mm/dd/yyyy] [ignorecase] [reltime {days | hours | minutes} timevalue]

install directory/filename reg-exp [abstime hh:mm:ss mm/dd/yyyy hh:mm:ss mm/dd/yyyy] [ignorecase] [reltime {days | hours | minutes} timevalue]

Syntax Description

activelog

Specifies a log on the active side.

inactivelog

Specifies a log on the inactive side.

install

Specifies an installation log.

reg-exp

Represents a regular expression.

directory/filename

Represents the path to the file(s) to search. You can use the wildcard character, *, to represent all or part of the filename.

abstime

Specifies which files to search based on file creation time. Enter a start time and an end time.

days|hours|minutes

Specifies whether the file age is in days, hours, or minutes.

ignorecase

Ignores case when searching.

reltime

Specifies which files to search based on file creation time. Enter the age of files to search.

hh:mm:ss mm/dd/yyyy

An absolute time, in the format hours:minutes:seconds month/day/year

timevalue

The age of files to search. Specify the unit of this value with the {days | hours | minutes} option.


Command Modes

Admin

Command privilege level: 0

Allowed during upgrade: Yes

Command History

Release
Modifications

1.2

This command was first documented.


Usage Guidelines

Write the search term in the form of a regular expression, which is a special text string for describing 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.

Examples

admin: file search activelog platform/log/platform.log Err[a-z] ignorecase

file tail

file tail

activelog directory/filename [detail] [hex] [lines]

inactivelog directory/filename [detail] [hex] [lines]

install directory/filename [detail] [hex] [lines]

Syntax Description

activelog

Specifies a log on the active side.

inactivelog

Specifies a log on the inactive side.

install

Specifies an installation log.

directory/filename

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

detail

Long listing with date and time.

hex

Hexadecimal listing.

lines

Number of lines to display.


Command Modes

Admin

Command privilege level: 1 for logs, 0 for TFTP files

Allowed during upgrade: Yes

Command History

Release
Modifications

1.2

This command was first documented.


Usage Guidelines

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

Examples

This example tails the operating system CLI log file.

admin: file tail activelog platform/log/cli00001.log



file view

file view

activelog directory/filename

inactivelog directory/filename

install directory/filename

Syntax Description

activelog

Specifies a log on the active side.

inactivelog

Specifies a log on the inactive side.

install

Specifies an installation log.

directory/filename

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

detail

Long listing with date and time.

hex

Hexadecimal listing.

lines

Number of lines to display.


Command Modes

Admin

Command privilege level: 0

Allowed during upgrade: Yes

Command History

Release
Modifications

1.2

This command was first documented.


Usage Guidelines

This command displays the contents of a file.

Examples

This example displays the install log.

admin: file view install install.log