Skip Headers
Oracle® Automatic Storage Management Administrator's Guide
12c Release 1 (12.1)

E17612-20
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

Oracle ACFS Command-Line Tools for Tagging

Table 16-25 contains a summary of the commands for Oracle ACFS tagging.

You can run acfsutil help on all platforms to display help text. You can run acfsutil version on all platforms to display the Oracle ACFS version.

When the options are entered with commands on a Windows platform, use / instead of - with the option. For example, you can display help for acfsutil on a Linux platform with acfsutil -h. On a Windows platform, use acfsutil /h.

A mount point on a Windows operating system can be a drive letter or a directory including the drive letter. When using a drive letter in a command, include the backslash (\) with the drive letter, such as in M:\, to avoid the possibility of triggering a Windows path substitution to the last accessed path on the specified drive.

On Solaris, acfsutil tag commands can set tag names on symbolic link files, but backup and restore utilities do not save the tag names that are explicitly set on the symbolic link files. Also, symbolic link files lose explicitly set tag names if they have been moved, copied, tarred, or paxed.

For an overview of Oracle ACFS tagging, refer to "Oracle ACFS Tagging". For information about Oracle ACFS tagging application programming interfaces (APIs), refer to "Oracle ACFS Tagging Generic Application Programming Interface".

Table 16-25 Summary of commands for Oracle ACFS tagging

Command Description

acfsutil tag info

Displays the tags for directories or files in Oracle ACFS file systems.

acfsutil tag set

Adds a tag to directories or files in an Oracle ACFS file system.

acfsutil tag unset

Removes a tag or all tag names from directories or files in an Oracle ACFS file system.


acfsutil tag info

Purpose

Displays the tag names for tagged directories or file names in Oracle ACFS file systems.

Syntax and Description


acfsutil tag info -h
acfsutil tag info [-r] [-c -t tagname] path [path ...]
acfsutil tag info [-c -t tagname]

acfsutil tag info -h displays help text and exits.

Table 16-26 contains the options available with the acfsutil tag info command.

Table 16-26 Options for the acfsutil tag info command

Option Description

-t tagname

Specifies the tag name string to display. Enclose the string in quotes if the string contains a space.

path

Specifies the path name to one or more files or directories.

-r

Specifies recursive action on a specified path.

-c

Specifies case-insensitive partial matching on the tag name.


The acfsutil tag info command can recursively apply the operation to all child files and subdirectories if the -r option is included with specified directory path names.

If no path names are specified, the acfsutil tag info command searches all Oracle ACFS mount points for tagged files.

Only the paths of tagged files in an Oracle ACFS file system are displayed. If the -t tagname option is included, only paths of files with a tag name exactly matching the specified tagname are displayed. If the -c option is included, then tagname can be a case-insensitive substring of a tag name for a successful match. For example, the acfsutil tag info -c -t AG command would display path names of files with tag names such as tag1, ag, or AG.

Any user may use this command to display tag info on a directory that the user has read access privileges.

Running acfsutil tag info on a file or directory that is protected by a security realm fails. If a user runs acfsutil tag info with the -r option on a directory protected by a security realm and the user does not have browse permissions on the directory, then no output is displayed. To resolve this issue, the user must be added to the security realm and granted READDIR permissions. For information about adding objects to an Oracle ACFS security realm, refer to "acfsutil sec realm add".

Examples

The following example show the use of the acfsutil tag info command.

Example 16-21 Using the acfsutil tag info command

$ /sbin/acfsutil tag info -r /acfsmounts/acfs1/myrepfiles/

acfsutil tag set

Purpose

Adds the given tag to the specified files or directories in an Oracle ACFS file system

Syntax and Description


acfsutil tag set -h
acfsutil tag set [-v] [-r] tagname path [path ...]

acfsutil tag set -h displays help text and exits.

Table 16-27 contains the options available with the acfsutil tag set command.

Table 16-27 Options for the acfsutil tag set command

Option Description

tagname

Specifies a tag name string. Enclose the string in quotes if the string contains a space.

The tag string can be composed of ASCII characters that include: a-b, A-Z, 0-9, the space character, the hyphen, and the underscore. The maximum length of a tag name is 32 characters.

all is a reserved tag name and cannot be set on any file or directory.

path

Specifies the path string to one or more files or directories.

-r

Specifies recursive action on the specified path.

-v

Displays the progress of the operation.


The command can recursively apply the operation to all child files and subdirectories for the specified directory path names.

When adding a tag name to a file or directory, the existing tags on that file or directory remain unchanged. New files that are created after a directory is assigned a tag implicitly inherit tags from their parent directories. Existing files in the directory do not inherit the new tag; these files must be explicitly assigned the tag. Renaming a file or moving a file to a subdirectory within the same file system does not cause the file to inherit tag names from the new parent directory. Moving a file between file systems uses a copy operation and the newly created file does inherit the tag names of the parent directory.

There is no fixed maximum number of tag names for an Oracle ACFS file system or for each file and directory. However, the number of tag names is limited by the tag names that fit in up to 64 KB of special metadata storage for each file and directory. This metadata also contains information to manage the extended attributes. Longer tag names reduce the total of tag names that can be set on a file or directory. For example, if all tag names were 4 bytes long, then it is possible to hold approximately 1730 tag names, assuming no other extended attribute information is present.

Any user who has the privilege to modify the target file or directory may run this command.

If a user runs acfsutil tag set with the -r option on a directory protected by a security realm and does not have browse permissions on the directory, then no tags are applied. To resolve this issue, the user must be added to the security realm and granted READDIR permissions. For information about adding objects to an Oracle ACFS security realm, refer to "acfsutil sec realm add".

Examples

The following example show the use of the acfsutil tag set command.

Example 16-22 Using the acfsutil tag set command

$ /sbin/acfsutil tag set repl_grp1 -r /acfsmounts/acfs1/myrepfiles/*.dat

acfsutil tag unset

Purpose

Removes the given tag name or all tag names from the specified file or directory.

Syntax and Description


acfsutil tag unset -h
acfsutil tag unset [-v] [-r] {all | tagname} path [path ...]

acfsutil tag unset -h displays help text and exits.

Table 16-28 contains the options available with the acfsutil tag unset command.

Table 16-28 Options for the acfsutil tag unset command

Option Description

all

Specifies to remove all tags in the path string.

tagname

Specifies a tag name string. Enclose the string in quotes if the string contains a space.

path

Specifies the path string to one or more files or directories.

-r

Specifies recursive action on the specified path.

-v

Displays the progress of the operation.


The command can recursively apply the operation to all child files and subdirectories for the specified directory path names.

When removing a tag name from a file or directory, other existing tags on that file or directory remain unchanged.

Any user who has privilege to modify the target file or directory may run this command.

If a user runs acfsutil tag unset with the -r option on a directory protected by a security realm and does not have browse permissions on the directory, then no tags are removed. To resolve this issue, the user must be added to the security realm and granted READDIR permissions. For information about adding objects to an Oracle ACFS security realm, refer to "acfsutil sec realm add".

Examples

The following example show the use of the acfsutil tag unset command.

Example 16-23 Using the acfsutil tag unset command

$ /sbin/acfsutil tag unset repl_grp1 -r
     /acfsmounts/acfs1/myrepfiles/*.log