Synopsis
fctrlcli HostName {/delete | /rename | /mkdir | /rmdir} /f:FilePathName [/fn:FileName] [/un:UserName] [/lg:LoginGroup] [/rc:nn /ri:nnnn]
Description
The fctrlcli command operates files or directories on a client. For file operations, the command deletes or renames files. For directory operations, the command creates or deletes directories. File operations with this command are performed using the Windows shared directories (Windows network share method) or through FTP services (FTP method).
If you wish only to operate remote files, you can do it even on the remote server without having Systemwalker Operation Manager installed.
Parameters
HostName
Specifies a host name of the client on which the file is to be operated. The host name in HostName must be specified using up to 15 characters. If HostName contains a space character, enclose it in double quotation marks.
/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 if specified 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.
Use one of the following methods to specify the path name of the file to FilePathName 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 a path including the drive name.
Specify the path name of desired file directly after "file://" character string.
file://c:\database\database.db
Specify a path in the format of "\\computer name\share name". For "computer name", specify a Windows-based computer name within 15 alphanumeric characters. Specify a share name within 80 bytes.
Specify the path name of desired file directly after "file://" string.
file://\\foo\share\database\database.db
Specify the 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.
Specify a file name in FileName within 255 characters, and enclose it in double quotation marks if a space character is contained.
This parameter is valid if the /rename parameter is specified.
/un:UserName
Specifies a user name to be used to access the file or directory specified in FilePathName.
The user name to be specified must be set in the password management book in advance. UseName 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 drive path or the UNC method, this parameter's specification is ignored. In this case, you need to access the target file with the user privileges logged in to the client running the Client Task Link service. If FilePathName is specified using a path on the FPT 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. This specification is valid if 1 or a greater value is specified in the /rc:nn parameter.
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.
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 command is executed to delete the local file "c:\database\master\database.db" on the client "foo". If deletion failed, retry is performed up to three times at an interval of 60 seconds.
fctrlcli foo /delete /f:file://c:\\database\\master\\database.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 [Client host name] HostName [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
If a wildcard is used, the information of each file is output by file basis.
The new file name you changed to is only output if the /rename parameter is specified.
This information is output if the /un 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 date and time] MM/DD/YYYY HH:MM:SS [Command error] Error message [Process end date and time] MM/DD/YYYY HH:MM:SS
For details on the messages, see the Systemwalker Operation Manager Message Guide.
Cautions
The Client Task Link service must be already working on the client side when you use this command.
Prior to running this command, you need to configure the password management book 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
To verify whether or not file transfer can be performed by using a path on the FTP server, see "10.1.2 fcopysvr File Transfer Command".
A backslash (\) in a path name for personal computer can be interpreted as an escape sequence depending on UNIX shells. To use a backslash in such shell string, enter two backlashes (\\).
If you use a wildcard for the file name specified using this command 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 by other Client Task Link commands.
The size per file should be 2GB or less.