FLAG
View/modify file and directory attributes; modify owner of file or directory;
view/modify search mode of executable files.
Synopsis
FLAG path [[+ | -]
attribute ... ] [/option ... ]
[/? | /VER]
Description
Use FLAG at a workstation to:
-
view or modify file and directory attributes to determine which operations
can be performed with the file or directory
-
modify the owner of a file or directory
-
view or modify the search mode of executable files to determine how the
program uses search drives when looking for a file
You can use wildcard characters.
Options
Used with no options, FLAG displays the status of all files in
the directory.
- path
-
Specify the path to the file or directory whose attributes or search modes
you want to modify.
- + | -
-
Add attributes to a file or directory (with +). Remove attributes
from a file or directory (with -).
If neither + nor - is used, attributes are assigned to
the file or directory as specified.
When you add or delete multiple attributes, include a space between
attribute abbreviations.
If you add and remove attributes in the same command, group all +
(plus) attributes together and all - (minus) attributes together.
- attribute
-
Specify one or more of the following directory or file attributes:
-
Directory attributes:
- ALL
-
Specify the Di, H, Ic, P,
Ri, and Sy attributes as a group. Primarily used to
assign directories these specific attributes.
- Di (Delete Inhibit)
-
Prevent the directory from being deleted.
- Dc (Do not Compress)
-
Prevent the directory from being compressed (regardless of what the volume
is set to).
- Dm (Do not Migrate)
-
Prevent the directory from being migrated to a secondary backup system
(regardless of what the volume is set to).
- H (Hidden)
-
Prevent the directory from being seen with a DOS DIR command.
- Ic (Immediate Compress)
-
Compress the directory as soon as the operating system can.
- N (Normal)
-
Specify no attributes.
- P (Purge)
-
Purge the directory immediately when it is deleted.
- Ri (Rename Inhibit)
-
Prevent the directory from being renamed.
- Sy (System)
-
Prevent the directory from being seen with a DOS DIR command;
also to prevent it from being copied or deleted.
-
File attributes:
- ALL
-
Specify the A, Ci, Di, H,
Ic, P, Ri, Ro, Sh,
Sy, and T attributes as a group. Primarily used to
assign files these specific attributes.
- A (Archive needed)
-
Indicate that the file has been modified since the last backup.
- Ci (Copy Inhibit)
-
(Only for MAC files) Prevent files from being copied.
- Dc (Do not Compress)
-
Prevent a file from being compressed (regardless of what the volume or
directory is set to).
- Di (Delete Inhibit)
-
Prevent a file from being deleted or copied over.
- Dm (Do not Migrate)
-
Prevent a file from being migrated to a secondary backup system (regardless
of what the volume or directory is set to).
- Ds (Do not Suballocate)
-
Prevent an individual file from being suballocated, even if suballocation is
enabled for the system. Use on files that are enlarged or appended to
frequently, such as database files.
- H (Hidden)
-
Prevent a filename from being displayed with the DOS DIR command.
The file cannot be copied or deleted.
- Ic (Immediate compress)
-
Compress a file as soon as the operating system can.
- N (Normal)
-
Specify the Rw attribute.
- P (Purge)
-
Purge a file immediately if the file is deleted.
- Ri (Rename Inhibit)
-
Prevent a file from being renamed.
- Ro (Read Only)
-
Allow a file only to be read; it cannot be written to or deleted (in other
words, Ro includes Ri and Di).
- Rw (Read Write)
-
Allow a file to be read and written to.
- Sh (Shareable)
-
Allow a file to be used by several users simultaneously.
- Sy (System)
-
Prevent a filename from being displayed with the DOS DIR command.
It cannot be copied or deleted.
- T (Transactional)
-
Protect a file by using the Transaction Tracking System
.
- X (Execute Only)
-
Prevent a file from being copied or copied over. This attribute can be
assigned only to .EXE or .COM files. You cannot remove
the Execute Only attribute. You must delete the file and then re-install it.
- /option
-
Specify an option from the following:
- /NAME | GROUP = name
-
Change the owner of a file or directory.
- /D
-
View details about a file or directory.
- /DO
-
View or modify only directories in the specified path.
- /FO
-
View or modify only files in the specified path.
- /OWNER=name
-
View all files or directories owned by a user.
- /M=mode
-
Specify a search mode for executable files. The syntax is
/M=mode
Replace mode with a mode number from the following list.
- 0
-
Search for instructions in the NET.CFG file (the default mode).
- 1
-
Search the path specified in the file. If there is no path, the file
searches the default directory, and then all search drives.
- 2
-
Search the path specified in the file. If there is no path, the file
searches only the default directory.
- 3
-
Search the path specified in the file. If there is no path, the file
searches the default directory; then if the open request is read only,
the file searches the search drives.
- 4
-
Reserved; do not use.
- 5
-
Search the path specified and then all search drives. If there is no
path, the file searches the default directory and then all search
drives.
- 6
-
Reserved; do not use.
- 7
-
First search the path specified. If the open request is read only, the file
searches the search drives. If there is no path, the file searches
the default directory and then all search drives.
- /S
-
Search the subdirectory in the specified path and any subdirectories below
that level.
- /C
-
Scroll continuously through output.
- /?
-
View online help. (Other parameters are ignored.)
- /VER
-
View the version number of the utility and the list of files it uses to
execute. (Other parameters are ignored.)
Status flags
- Cc (Ca not Compress)
-
The file cannot be compressed because of limited space savings.
- Co (Compressed)
-
The file has been compressed.
- M (Migrated)
-
The file has been migrated.
Examples
-
To add Rw and Ic and remove Di and A
from files in the directory type:
FLAG
.
+R W Ic -Di A
-
To view attributes for file STUDENTS in directory
SYS:\COURSE\WINTER type:
FLAG SYS:\COURSE\WINTER\STUDENTS
-
To give files in drive G: the ``Hidden'' attribute type:
FLAG G:
.
H /FO
-
To set the search mode to 7 for executable files in the directory type:
FLAG
.
/M=7
-
To set the search mode to 1 and assign files in the directory the Read Write
attribute type:
FLAG
.
RW /M=1
© 1999 The Santa Cruz Operation, Inc. All rights reserved.
UnixWare 7 Release 7.1.1 - 5 November 1999