7.8 Attributes Utility for Linux

The Attributes (ATTRIB) Utility for Linux allows you to specify file system attributes for directories and files in NSS volumes on OES Linux.

IMPORTANT:This utility works only with directories and files in the NSS file system on Linux.

7.8.1 Purpose

Use at a workstation to

  • View or modify file system attributes for files
  • View or modify file system attributes for directories

7.8.2 Syntax

attrib [OPTIONS] [filename]

If both the set and clear options are selected, the clear option is done before the set option. If the filename is not specified, the operation is done on the current directory.

7.8.3 Options

OPTIONS

Option

Description

-s, --set=ATTRIBUTES

Sets the attributes on the file

-c, --clear=[ATTRIBUTES | all]

Clears the attributes on the file

-l, --long

Displays a long version of the file’s attributes

-q, --quiet

Does not display any normal output

-v, --version

Displays the program version information

-h, --help

Displays the ATTRIB help screen

ATTRIBUTES

Multiple attributes are comma separated.

Code

Description

Applies to Files

Applies to Directories

aa

Attribute Archive identifies that a file’s metadata has been modified since the last backup. This attribute is assigned automatically.

Yes

No

all

All (used only for the Clear option) represents all attributes that can be modified.

Yes

Yes

ar

Archive identifies files that have modified content since the last backup. This attribute is assigned automatically.

Yes

No

cc

Cannot compress (status display only) displays if the file cannot be compressed because of limited space savings.

Yes

No

ci

Copy Inhibit prevents users from copying a file. This attribute overrides the trustee Read right and File Scan right.

Yes

No

cm

Compressed (status display only) displays whether the file is currently stored in compressed format.

Yes

No

dc

Do Not Compress keeps data from being compressed. This attribute overrides settings for automatic compression of files not accessed within a specified number of days.

Yes

No

di

Delete Inhibit prevents users from deleting a directory or file.

This attribute overrides the trustee Erase right. When it is enabled, no one, including the owner and network administrator, can delete the directory or file. A trustee with the Modify right must disable this right to allow the directory or file to be deleted.

Yes

Yes

ex

Execute indicates program files such as .exe or .com.

Yes

No

hi

Hidden hides directories and files so they do not appear in a file manager or directory listing.

Yes

Yes

ic

Immediate Compress sets data to be compressed as soon as a file is closed. If applied to a directory, every file in the directory is compressed as each file is closed.

The files in the specified directory are compressed as soon as the operating system can perform the operation after the file is closed. This does not apply to the directory’s subdirectories and the files in them.

Yes

Yes

ip

Immediate Purge flags a directory or file to be erased from the system as soon as it is deleted. Purged directories and files cannot be recovered.

Yes

Yes

ln

Link (status display only) indicates a symbolic link (soft link).

Yes

No

mg

Migrated (status display only) displays if the file or directory is migrated to near-line media.

Yes

Yes

mi

Migrate Inhibit prevents directories and files from being migrated from the server’s disk to a near-line storage medium.

Yes

Yes

ri

Rename Inhibit prevents the directory or file name from being modified.

Yes

Yes

ro

Read Only prevents a file from being modified. This attribute automatically sets Delete Inhibit and Rename Inhibit.

Yes

No

sd

Subdirectory (status display only) indicates that the entry is a directory, not a file.

No

Yes

sh

Sharable allows more than one user to access the file at the same time. This attribute is usually used with Read Only.

Yes

No

sy

System hides the directory or file so it does not appear in a file manager or directory listing. System is normally used with operating system files, such as Linux or NetWare system files.

Yes

Yes

tr

Transactional allows a file to be tracked and protected by the Transaction Tracking System™ (TTS™).

Yes

No

vo

Volatile indicates that a file can change without being written to so that opportunistic locks cannot be set on it.

Yes

No

7.8.4 Example

attrib /designs/topsecret -c=all -s=ro,di

This command clears all attributes, then sets read-only and delete-inhibit on the /designs/topsecret file.