PRIMECLUSTER Global File Services Configuration and Administration Guide 4.2 (Solaris(TM) Operating Environment)
Contents Index PreviousNext

Appendix F Reference Manual> F.3 General Commands Specific to the GFS Shared File System

F.3.1 sfccp(1) Copies files with extent attribute information

[SYNOPSIS]

sfccp [ -fip ] [ -e ext_action ] source_file target_file

sfccp [ -fip ] [ -e ext_action ] source_file... target

sfccp -r | -R [ -fip ] [ -e ext_action ] source_dir... target

[DESCRIPTION]

The sfccp command copies both files with file extension attribute information or files without file extension attribute information on the GFS Shared File System. If necessary, the sfccp command will operate on a file system other than the GFS Shared File System, but in this case, using cp(1) is strongly recommended.

In format 1 shown in SYNOPSIS, neither source_file nor target_file must be a directory file, and they must not be specified with the same name. The sfccp utility copies the contents of the file indicated by source_file and the extent attribute information of the GFS Shared File System to the destination path indicated by target_file. If target_file already exists, sfccp overwrites the contents of the file. The mode (ACL if it is valid), owner, and group of the file, however, remain unchanged. For information about file extension attribute information, see the explanation of the -e option. The latest update time in target_file and the latest access time in source_file are set as the copy time. If target_file file is not found, sfccp creates a file named target_file. The mode of this file is the same as that of source_file. However, a sticky bit is not specified unless the user that issued this command is a super user. For the owner and group of target_file, the owner name and the group name of the owner are used. If target_file indicates a link to another file having a link, the other link remains and target_file assumed to be a new file.

In format 2, sfccp copies one or more files indicated by source_file to a directory indicated by target. For each source_file, a new file is created in target. in the same mode (the same ACL if it is valid). In this case, this system uses the owner and group of the user that issues this command. When the type specified in source_file is directory, target is not found, and target is not directory, processing fails.

In format 3, sfccp copies one or more directories indicated by source_dir to the directory indicated by target. Either -r or -R must be specified. sfccp copies all files and subdirectories in each directory indicated by source_dir.

[OPTIONS]

The following options can be specified:

-e ext_option

Specifies an operation for file extension attribute information. Explanation of ext_option
AWE
Append Write Extent (default).
When target and target_file already exist with file extension attribute information, this option does not copy the file extension attribute information. Otherwise, this option copies extent attribute information.
IWE
Interactive Write Extent.
When target and target_file already exist with file extension attribute information, this option displays a confirmation message asking whether the file extension attribute information should be overwritten. If the response is y , the file extension attribute information is copied if the response is another character, the information is not written.
NWE
Not Write Extent.
This option does not copy file extension attribute information in the same way as cp(1).
OWE
OverWrite Extent.
This option forcibly copies the file extension attribute information of source to target and target_file. Even though the source does not contain file extension attribute information, it is forcibly copied to target and target_file.

-f

Releases a link. If a file descriptor is not obtained for the destination file, this option releases the link of the destination file and attempts to continue processing.

-i

Indicates interactive mode. When target and target_file specified, as destination files already exist, this option displays a confirmation message asking whether the data should be overwritten. If the response is y, copy processing is continued. If the response is another character, the data is not overwritten. When both the -i option and -e IWE option are specified together, they are processed independently in interactive mode.

-p

Holds data. sfccp copies the contents of the file indicated by source_file, and also specifies an owner and group ID, access right mode, update time, and access time of the output file. If ACL is valid, the input file value is set as the ACL value. This command does not fail when it is not possible to specify an update time, access time, or access right mode. When the owner and group ID cannot be specified, sfccp does not fail, and clears S_ISUID and S_ISGID of the output file. If these bits cannot be cleared, sfccp outputs a diagnostic message to the standard error output and returns a termination status other than 0.
To store the owner, group ID, access right mode, update time, and access time, the user must have access permission to the appropriate file. In other words, the user must have the same owner ID as that of the target file.

-r

Recursive. sfccp copies to target the entire directory (that is, all files in the directory), and also copies all subdirectories in the directory and all files in the subdirectories.

-R

The same as -r, except hat a named pipe file is copied, not read.

[OPERANDS]

The following operands can be specified:

source_file

Path name of an ordinary file to be copied

source_dir

Path name of a directory to be copied

target_file

Path name of the file used as the output when one file is copied regardless of whether the file already exists.

target

Path name of a directory to which a copied file is to be written

[EXAMPLE]

1. Examples in which one file is copied

% sfccp goodies goodies.old
% ls goodies*
goodies goodies.old

2. Examples in which one file group is copied to a directory

% sfccp ~/src/*   /dst

3. Examples in which a specific directory is copied first to a new directory, and then to an existing directory

% ls ~/bkup
/usr/example/fred/bkup not found
% sfccp -r ~/src ~/bkup
% ls -R ~/bkup
x.c y.c z.sh
% sfccp -r ~/src ~/bkup
% ls -R ~/bkup
src x.c y.c z.sh
src:
x.c y.c z.sh

4. Example in which data is forcibly copied on the basis of source information when target has extent attribute information

% sfccp -e OWE source target

[ENVIRONMENT]

For information about environment variables LC_COLLATE, LC_CTYPE, LC_MESSAGES, and NLSPATH, which affect the execution of sfccp, see environ(5).

[EXIT STATUS]

The following termination status information is returned:

0 All files have been copied successfully.
>0 An error has occurred.

[SEE ALSO]

sfccpio(1), sfcgetext(1), sfcgetfattr(1), sfcmv(1), sfcsetext(1), sfcsettime(1), sfcsetvolume(1).

cp(1), chmod(1), chown(1), setfacl(1), utime(2), attributes(5), environ(5), largefile(5) in the "Solaris X Reference Manual Collection."

[NOTES]


Contents Index PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2004