Top
Systemwalker Operation Manager  Reference Guide
FUJITSU Software

10.1.3 fctrlsvr File Operation Command

Synopsis

fctrlsvr {/delete | /rename | /mkdir | /rmdir} /f:FilePathName
      [/fn:FileName] [/un:UserName] [/lg:LoginGroup]
      [/rc:nn /ri:nnnn]

Description

The fctrlsvr command operates files or directories on a server. For file operations, the command deletes or renames files. For directory operations, the command creates or deletes directories. The files that can be operated with this command are the local files (including directories on the NFS server) and files on the FTP server.

If you wish only to operate remote files, you can do it even on the remote server without having Systemwalker Operation Manager installed.

Parameters

/delete

Deletes a file.

/rename

Renames a file.

/mkdir

Creates a directory.

/rmdir

Deletes a directory.

/f:FilePathName

Specify a path name of the file or directory to be operated. You can use a wildcard for the file name only when using with the /delete or /rename parameter.

Since wildcard characters such as an asterisk (*) have special meaning to shell, you need to enclose FilePathName with either single or double quotation marks as necessary.

In FilePathName, use one of the following methods to specify the file path name in the URL format. The path name must be no longer than 255 characters, and enclose it in double quotation marks if a space character is contained.

A local drive path:

Specify an absolute path from the root directory.

Specify the path name of desired file directly after "file://" string.

Example:

file:///usr/database/database.db

A path on the FTP server:

Specify a path name to the FTP server.

The path name can be specified with a full path name or relative path name from the current directory in logging in with FTP. Specify the path name in the format of "server name/path name of desired file" directly after "ftp://" string.

Example) To specify using the full path name:

ftp://foo.bar.com//usr/database/database.db

Example) To specify using the relative path name:

ftp://foo.bar.com/database/database.db

/fn:FileName

Specifies the new file name you change to. You can use a wildcard for this parameter.

Since wildcard characters such as an asterisk (*) have special meaning to shell, you need to enclose FileName with either single or double quotation marks as necessary.

FileName must be no longer than 255 characters, and enclose it in double quotation marks if a space character is contained.

This parameter is valid only when the /rename parameter is specified.

/un:UserName

Specifies a user name to be used to access the file or directory specified with FilePathName.

The user name to be specified must be set in the password management book in advance. UserName must be no longer than 20 alphanumeric characters. If UserName contains a space character, enclose it in double quotation marks.

If FilePathName is specified using a local path, this parameter's specification is ignored.

However, if FilePathName is specified using a path on the FTP server, be sure to specify this parameter.

/lg:LoginGroup

Specifies a login definition name used to manage the password management book. The login definition name in LoginGroup must be no longer than 256 characters, and enclose it in double quotation marks if a space character is contained.

If the /un parameter is specified, be sure to specify this parameter.

/rc:nn

Specifies the retry count in case an error occurs in file operation.

Specify an integer value between 0 and 99 for nn. Setting any other value results in an error. If omitted, no retry is performed.

/ri:nnnn

Specifies the retry interval in case an error occurs.

Specify an integer value between 0 and 9999 (in seconds) for nnnn. Setting any other value results in an error. The default value is 0.

This parameter is valid if 1 or a greater value is specified to nn in the /rc parameter.

Return Values

Return value

Meaning

0

Completed

Value other than 0

Abended

Command Location

Solaris

/opt/FJSVsnjss/bin

HP-UX

/opt/FHPsnjss/bin

AIX

/opt/FAIXsnjss/bin

Linux

/opt/FJSVsnjss/bin

Example

In this example, the local file "/usr/database/master/database.db" on the server is renamed into "database_backup.db". If renaming fails, retry is performed up to three times at an interval of 60 seconds.

fctrlsvr /rename /f:file:///usr/database/master/database.db
       /fn:database_backup.db /rc:3 /ri:60

Execution Results/Output Format

After the command has been through processing, the information at command completion is output to the standard output.

The contents to be output are shown below:

[Process start time] MM-DD-YYYY HH:MM:SS
[Server host/User name] Server host name/user name (*)
[Retry count] Number of retries performed (*)
[Error] Error message (*)
[File operation type] File operations/Directory name New file name (**)(***)
[Retry count] Number of retries performed (**)
[Error] Error message (**)
[Process end time] MM-DD-YYYY HH:MM:SS
*:

This information is output if the /un parameter is specified.

**:

If a wildcard is used, the information of each file is output by file basis.

***:

The new file name you changed to is output only when the /rename parameter is specified.

In [Error], "None" is output if the command completed successfully. A message is output if the command is canceled or failed. For details on the messages, see the Systemwalker Operation Manager Message Guide.

In [File operation type], any of "Delete file", "Rename file", "Create directory", or "Delete directory" is output.

If an error occurs before performing file operations, a message is output in the following format:

[Process start time] MM-DD-YYYY HH:MM:SS
[Command error] Error message
[Process end time] MM-DD-YYYY HH:MM:SS

For details on the messages, see the Systemwalker Operation Manager Message Guide.

Cautions