ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahz_5.4.0.1/attr.htm

412 lines
14 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<meta http-equiv="Content-Type" content=
"text/html; charset=utf-8">
<title>attr - Get or set attributes for files</title>
<LINK rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</HEAD>
<body bgcolor="#FFFFFF">
<!-- Java sync-link -->
<SCRIPT LANGUAGE="Javascript" SRC="../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
<h2>attr - Get or set attributes for files</h2>
<p><strong>Synopsis</strong></p>
<p>
<strong>attr [ -hp ]</strong> <em>file</em> <strong>[</strong> <em>attribute</em> <strong>[</strong> <em>=value</em> <strong>]</strong> ... <strong>]</strong>
</p>
<p><strong>Description</strong></p>
<p>The <strong>attr</strong> utility gets or sets attributes for the object specified by <em>file</em>.
When no <em>attributes</em> are specified, <strong>attr</strong> displays all of the attributes
for the object in a re-entrable format to standard output. When an <em>attribute</em> is specified,
<strong>attr</strong> displays the value of the attribute to standard output.
When an <em>attribute</em> and <em>value</em> are specified, <strong>attr</strong> sets
the attribute to the value. Note that all attributes can be displayed, but
only some attributes can be set.</p>
<p>
For date and time attributes, the value displayed by default is formatted with
the asctime() function. If the LC_TIME environment variable is set, the value
displayed is formatted with the format specified by the d_t_fmt keyword in the
LC_TIME category of the specified locale.</p>
<p>See the <a href="../apis/qgetattr.htm">Qp0lGetAttr()</a> API for detailed
information about the attributes and their values.</p>
<p><strong>Options</strong></p>
<dl>
<dt><strong>-h</strong></dt>
<dd>Display or set the attributes of a symbolic link instead of the object pointed
to by the symbolic link.</dd>
<dt><strong>-p</strong></dt>
<dd>Display the <em>attribute</em> in an re-entrable format.</dd>
</dl>
<p><strong>Operands</strong></p>
<p>The <em>file</em> operand specifies a path name to an object. The <em>attribute</em>
operand can have the following values:
<dl>
<dt><em>ACCESS_TIME</em></dt>
<dd>The date and time the object was last accessed.
This attribute can only be displayed.<p></dd>
<dt><em>ALLOC_SIZE</em></dt>
<dd>The number of bytes allocated for the object displayed as a 32-bit number.
This attribute can only be displayed.<p></dd>
<dt><em>ALLOC_SIZE_64</em></dt>
<dd>The number of bytes allocated for the object displayed as a 64-bit number.
This attribute can only be displayed.<p></dd>
<dt><em>ALWCKPWRT</em></dt>
<dd>An indicator if a stream file can be shared with
readers and writers during the save-while-active checkpoint processing.
This attribute can be displayed or set.<p></dd>
<dt><em>ALWSAV</em></dt>
<dd>An indicator of whether the object can be saved or not.
This attribute can be displayed or set.<p></dd>
<dt><em>ASP</em></dt>
<dd>The auxillary storage pool in which the object is stored.
This attribute can only be displayed.<p></dd>
<dt><em>AUDIT</em></dt>
<dd>The auditing value associated with the object.
This attribute can only be displayed.<p></dd>
<dt><em>AUTH_GROUP</em></dt>
<dd>The name of the user profile that is the primary group for the object.
This attribute can only be displayed.<p></dd>
<dt><em>AUTH_LIST_NAME</em></dt>
<dd>The name of the authorization list used to secure the object.
This attribute can only be displayed.<p></dd>
<dt><em>AUTH_OWNER</em></dt>
<dd>The name of the user profile that is the owner of the object.
This attribute can only be displayed.<p></dd>
<dt><em>AUTH_USERS</em></dt>
<dd>The list of user profiles that are authorized to use the object.
This attribute can only be displayed.<p></dd>
<dt><em>CCSID</em></dt>
<dd>The coded character set identifier (CCSID) of the object.
This attribute can be displayed or set.<p></dd>
<dt><em>CHANGE_TIME</em></dt>
<dd>The date and time the object's data or attributes were last changed.
This attribute can only be displayed.<p></dd>
<dt><em>CHECKED_OUT</em></dt>
<dd>An indicator if the object is checked out.
This attribute can only be displayed.<p></dd>
<dt><em>CHECKED_OUT_USER</em></dt>
<dd>The user profile that has the object checked out.
This attribute can only be displayed.<p></dd>
<dt><em>CHECKED_OUT_TIME</em></dt>
<dd>The date and time that the object was checked out.
This attribute can only be displayed.<p></dd>
<dt><em>CODEPAGE</em></dt>
<dd>The code page derived from the coded character set identifier (CCSID) of the object.
This attribute can be displayed or set.<p></dd>
<dt><em>CREATE_TIME</em></dt>
<dd>The date and time the object was created.
This attribute can only be displayed.<p></dd>
<dt><img src="delta.gif" alt="Start of change"><em>CRTOBJAUD</em></dt>
<dd>The create object auditing value associated with a directory. The
auditing value is given to any objects created in the directory.
This attribute can be displayed or set.<img src="deltaend.gif" alt="End of change"><p></dd>
<dt><em>CRTOBJSCAN</em></dt>
<dd>An indicator of whether the objects created in a directory will be scanned
when exit programs are registered with any of the integrated file system
scan-related exit points. This attribute can be displayed or set.<p></dd>
<dt><em>DATA_SIZE</em></dt>
<dd>The size in bytes of the data in the object displayed as a 32-bit number.
This attribute can only be displayed.<p></dd>
<dt><em>DATA_SIZE_64</em></dt>
<dd>The size in bytes of the data in the object displayed as a 64-bit number.
This attribute can only be displayed.<p></dd>
<dt><em>DIR_FORMAT</em></dt>
<dd>An indicator of the format of a directory object.
This attribute can only be displayed.<p></dd>
<dt><em>DISK_STG_OPT</em></dt>
<dd>An indicator of how auxiliary storage storage is allocated by the system for the object.
This attribute can be displayed or set.<p></dd>
<dt><em>EXTENDED_ATTR_SIZE</em></dt>
<dd>The number of bytes used for extended attributes for the object.
This attribute can only be displayed.<p></dd>
<dt><em>FILE_FORMAT</em></dt>
<dd>The format of the stream file. This attribute can only be displayed.<p></dd>
<dt><em>FILE_ID</em></dt>
<dd>The file identifier of the object if the object is stored in the
"root" (/), the QOpenSys, or a user-defined file system.
This attribute can only be displayed.<p></dd>
<dt><em>JOURNAL_APPLY_CHANGES</em></dt>
<dd>An indicator of whether the object was restored with partial transactions
which requires an Apply Journaled Changes (APYJRNCHG) command to complete
the transaction. This attribute can only be displayed.<p></dd>
<dt><em>JOURNAL_ID</em></dt>
<dd>The journal identifier that can be used on journal-related commands and APIs.
This attribute can only be displayed.<p></dd>
<dt><em>JOURNAL_LIBRARY</em></dt>
<dd>If the object is journaled, the library containing the currently used journal.
If the object is not journaled, the library containing the last used journal.
This attribute can only be displayed.<p></dd>
<dt><em>JOURNAL_NAME</em></dt>
<dd>If the object is journaled, the name of the currently used journal.
If the object is not journaled, the name of the last used journal.
This attribute can only be displayed.<p></dd>
<dt><em>JOURNAL_OPTIONS</em></dt>
<dd>The current journaling options.
This attribute can only be displayed.<p></dd>
<dt><em>JOURNAL_RCVR_ASP</em></dt>
<dd>The name of the ASP for the library that contains the journal receiver.
This attribute can only be displayed.<p></dd>
<dt><em>JOURNAL_RCVR_LIBRARY</em></dt>
<dd>The name of the library that contains the journal receiver.
This attribute can only be displayed.<p></dd>
<dt><em>JOURNAL_RCVR_NAME</em></dt>
<dd>The name of the oldest journal receiver needed to successfully Apply Journaled Changes (APYJRNCHG).
This attribute can only be displayed.<p></dd>
<dt><em>JOURNAL_ROLLBACK_ENDED</em></dt>
<dd>An indicator of whether the object had rollback ended before completion of a request to
roll back a transaction. This attribute can only be displayed.<p></dd>
<dt><em>JOURNAL_START_TIME</em></dt>
<dd>The date and time that journaling was last started for the object.
This attribute can only be displayed.<p></dd>
<dt><em>JOURNAL_STATUS</em></dt>
<dd>An indicator if the object is currently journaled.
This attribute can only be displayed.<p></dd>
<dt><em>LOCAL_REMOTE</em></dt>
<dd>An indicator if the object is on the local system or a remote system.
This attribute can only be displayed.<p></dd>
<dt><em>MAIN_STG_OPT</em></dt>
<dd>An indicator of how main storage is allocated and used by the system for the object.
This attribute can be displayed or set.<p></dd>
<dt><em>MODIFY_TIME</em></dt>
<dd>The date and time that the object's data was last modified.
This attribute can only be displayed.<p></dd>
<dt><em>MULT_SIGS</em></dt>
<dd>An indicator if the object has more than one i5/OS<SUP>(TM)</SUP> digital signature.
This attribute can only be displayed.<p></dd>
<dt><em>OBJTYPE</em></dt>
<dd>A text string describing the type of the object.
This attribute can only be displayed.<p></dd>
<dt><em>PC_ARCHIVE</em></dt>
<dd>An indicator if the object has changed since the last time the
file was examined. This attribute can be displayed or set.<p></dd>
<dt><em>PC_HIDDEN</em></dt>
<dd>An indicator if the object is hidden.
This attribute can be displayed or set.<p></dd>
<dt><em>PC_READ_ONLY</em></dt>
<dd>An indicator if the object is read-only.
This attribute can be displayed or set.<p></dd>
<dt><em>PC_SYSTEM</em></dt>
<dd>An indicator if the object is a system object.
This attribute can be displayed or set.<p></dd>
<dt><em>RSTDRNMUNL</em></dt>
<dd>An indicator of whether renames and unlinks are restricted for objects
within a directory. Objects can be linked into a directory that has this attribute
set on, but cannot be renamed or unlinked from it unless the user has the
appropriate authority.
This attribute can be displayed or set.<p></dd>
<dt><em>SCAN</em></dt>
<dd>An indicator of whether the object will be scanned when exit programs are registered
with any of the integrated file system scan-related exit points.
This attribute can be displayed or set.<p></dd>
<dt><em>SCAN_BINARY</em></dt>
<dd>An indicator of whether the object has been scanned in binary mode when it was
previously scanned. This attribute can only be displayed.<p></dd>
<dt><em>SCAN_CCSID1</em></dt>
<dd>If an object has been scanned in text mode, the first CCSID used when it was
previously scanned. This attribute can only be displayed.<p></dd>
<dt><em>SCAN_CCSID2</em></dt>
<dd>If an object has been scanned in text mode, the second CCSID used when it was
previously scanned. This attribute can only be displayed.<p></dd>
<dt><em>SCAN_SIGS_DIFF</em></dt>
<dd>An indicator of whether the scan signature for the object is different from the global
scan signature. This attribute can only be displayed.<p></dd>
<dt><em>SCAN_STATUS</em></dt>
<dd>The scan status for the object.
This attribute can only be displayed.<p></dd>
<dt><em>SGID</em></dt>
<dd>An indicator if the effective group ID is set at run time.
This attribute can be displayed or set.<p></dd>
<dt><em>SIGNED</em></dt>
<dd>An indicator if the object has an i5/OS<SUP>(TM)</SUP> digital signature.
This attribute can only be displayed.<p></dd>
<dt><em>STG_FREE</em></dt>
<dd>An indicator if the data is moved offline.
This attribute can only be displayed.<p></dd>
<dt><em>SUID</em></dt>
<dd>An indicator if the effective user ID is set at run time.
This attribute can be displayed or set.<p></dd>
<dt><em>SYSTEM_ARCHIVE</em></dt>
<dd>An indicator if the object has changed and needs to be saved.
This attribute can be displayed or set.<p></dd>
<dt><img src="delta.gif" alt="Start of change"><em>SYSTEM_USE</em></dt>
<dd>An indicator if the object has a special use by the system.
This attribute is valid only for stream files.
This attribute can only be displayed.<img src="deltaend.gif" alt="End of change"><p></dd>
<dt><em>SYS_SIGNED</em></dt>
<dd>An indicator of whether the i5/OS<SUP>(TM)</SUP> digital signature is from a source that is trusted by the system.
This attribute can only be displayed.<p></dd>
<dt><em>UDFS_DEFAULT_FORMAT</em></dt>
<dd>The default file format of stream files created in the user-defined file system.
This attribute can only be displayed.<p></dd>
<dt><em>USAGE_DAYS_USED</em></dt>
<dd>The number of days an object has been used.
This attribute can only be displayed.<p></dd>
<dt><em>USAGE_LAST_USED_TIME</em></dt>
<dd>The date and time that the object was last used.
This attribute can only be displayed.<p></dd>
<dt><em>USAGE_RESET_TIME</em></dt>
<dd>The date and time that the object's days used count was reset to zero.
This attribute can only be displayed.<p></dd>
</dl>
</p>
<p><strong>Environment Variables</strong></p>
<p><strong>attr</strong> is affected by the following environment
variables:</p>
<dl>
<dt><strong>LANG</strong></dt>
<dd>Provides a default value for locale categories that are not specifically
set with a variable starting with LC_.</dd>
<dt><strong>LC_TIME</strong></dt>
<dd>Defines the output format for date and time attributes.</dd>
</dl>
<p><strong>Exit Status</strong></p>
<ul>
<li>0 when successful</li>
<li>&gt;0 when unsuccessful</li>
</ul>
<p><strong>Related information</strong></p>
<ul>
<li><a href="setccsid.htm">setccsid - Set CCSID attribute for file</a></li>
<li><a href="touch.htm">touch - Change file access and modification times</a></li>
<li><a href="../apis/qgetattr.htm">Qp0lGetAttr() - Get attributes</a></li>
<li><a href="../apis/qsetattr.htm">Qp0lSetAttr() - Set attributes</a></li>
</ul>
<p><strong>Examples</strong></p>
<ol>
<li>Display all of the attributes for a file.
<pre>
attr script.sh
</pre>
</li>
<li>Display the OBJTYPE and PC_READ_ONLY attributes for a file.
<pre>
attr script.sh OBJTYPE PC_READ_ONLY
</pre>
</li>
<li>Display the DATA_SIZE_64 attribute in a re-entrable format for a file.
<pre>
attr -p script.sh DATA_SIZE_64
</pre>
</li>
<li>Set the PC_HIDDEN attribute for a file.
<pre>
attr script.sh PC_HIDDEN=1
</pre>
</li>
</ol>
</body>
</html>