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.
Specify an absolute path from the root directory.
Specify the path name of desired file directly after "file://" string.
file:///usr/database/database.db
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.
ftp://foo.bar.com//usr/database/database.db
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
Prior to running this command, you need to configure the password management book by using the password management command. See "10.3.1 lgmanage Password Management Command" or further details.
The FTP servers available for file operations by specifying a path on it are limited to those on which the execution results of "dir" command are displayed in the following format (with permission, number of links, owner, group, size, date, time, and file name are listed in this order, in alphanumerical notation).
-rw-rw-r-- 1 xxxxx xxxxxx 605877 Dec 19 18:44 xxxxx.xxx -rw-rw-r-- 1 xxxxx xxxxxx 560661 Dec 19 18:59 xxxxx.xxx drwx------ 4 xxxxx xxxxx 96 Jan 20 1998 xxxxx -rw-rw-r-- 1 xxxxx xxxxx 6042 Jan 25 13:38 xxxxxxxxxxx -rw-rw-r-- 1 xxxxx xxxxx 5433 Feb 3 17:11 xxxxx.xxx -rw-rw-r-- 1 xxxxx xxxxx 2155 Feb 3 17:35 xxxxx.xxx -rw-rw-r-- 1 xxxxx xxxxx 3090 Feb 1 20:13 xxxxx.xxx
See "10.1.2 fcopysvr File Transfer Command" or how to verify whether or not the path on the FTP server can be specified.
When using a wildcard for the file name specified with the /f parameter, the following considerations are needed:
The number of files to be processed at a time should be 500 or less, including the files to be processed simultaneously by other Server Task Link commands.
The size per file should be 2GB or less.