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

Appendix B Reference Manual> B.3 General Commands Specific to the GFS Local File System

B.3.4 sfxmv(1) - Moves files with extent attribute information

[SYNOPSIS]

sfxmv [-fi] source target_file
sfxmv [-fi] source... target_dir

[DESCRIPTION]

The sfxmv command moves a file with or without extent attribute information on the GFS Local File System. sfxmv also operates on the other file system, but in this case, mv(1) should be used as much as possible.

In format 1 above, the sfxmv utility moves the file indicated by the source operand to the destination indicated by the target_file. The same name cannot be specified for source and target_file. If target_file is not found, sfxmv creates a new file with the same name. If target_file is found, its contents are overwritten. When the last operand does not indicate an existing directory, sfxmv is assumed to be in format 1.

In format 2, the sfxmv utility moves each file specified in the source operand to each file in an existing directory indicated in the target_dir operand. In the destination path name for a source, a slash (/) and the last path name of source are added after the destination directory name. When the last operand indicates an existing directory, sfxmv is assumed to be in format 2.

When target_file is identified in write-disabled mode, sfxmv displays a mode (see chmod(2)), requests a response, and reads one line from the standard input. If the response is positive and sfxmv has the appropriate permission, it moves the file. Otherwise, this command terminates. When target_file makes ACL valid, the access right is not completely displayed in mode. If the parent directory of source is in write-enabled mode with a sticky bit set, one or more of the following conditions must be true:

o The user must own the file.

o The user must own directories.

o The file must be in user-write-enabled mode.

o The user must be a privileged user.

When source indicates a file and target_file indicates a link to another file having a link, the other link remains, and target_file changes to a new file.

[OPTIONS]

-f

sfxmv moves a file without displaying a prompt even when it writes data to an existing target. Note that this option is the default if the standard input is not a terminal.

-i

sfxmv always displays a confirmation prompt when an existing target is overwritten in a move operation. If the response is y, the move processing continues. If the response is another character, sfxmv does not overwrite target.
When both the -f and -i options are specified, they are not assumed to be illegal. Instead, the -f option is valid.

[OPERANDS]

The following operands can be specified:

source

Path name of a file or directory to be moved

target_file

A new path name of a file or directory to be moved

target_dir

Path name of an existing directory used as the destination of the move file operation

[ENVIRONMENT]

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

[EXIT STATUS]

The following termination status information is returned:

0 All input files have been moved correctly.

>0 An error has occurred.

[SEE ALSO]

sfxcp(1), sfxcpio(1), sfxgetext(1), sfxsetext(1)

mv(1), cp(1), cpio(1), ln(1), rm(1), setfacl(1), chmod(2), attributes(5), environ(5), largefile(5).

[NOTES]

When source and target_dir are on different file systems, sfxmv copies the file and deletes the originals; In this case, all links to other files are deleted. Since users can clearly specify the end of a command line option with two consecutive hyphens (--), sfxmv can identify a file name argument that begins with a single hyphen (-). For a move operation in BSD, sfxmv accepts a single hyphen (-) as a synonym of two hyphens (--). Note, however, that the BSD move function may be deleted in future releases. If both two consecutive hyphens (--) and a single hyphen (-) are specified on the same line, the latter is interpreted as specifying a file name.

When target is specified, use sfxcp(1) to store extent attribute information for target (with -e NWE specified).

sfxmv can move a file between different file systems. If a file on the GFS Local File System is moved to another file system (for example UFS), however, extent attribute information is deleted.

sfxmv will operate on a file system other than the GFS Local File System, but its operation will be equivalent to the conventional mv(1).


Contents Index PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2004