carta
cpmchattr(1)

cpmchattr1

Change file attributes on cp/m files

Usage

cpmchattr [-f format] [-u] image attrib file-pattern ...

Overview

Cpmchattr changes the file attributes for files on CP/M disks.

Options

-f format

Use the given CP/M disk format instead of the default format.

-T libdsk-type

libdsk driver type, e.g. tele for Teledisk images or raw for raw images (requires building cpmtools with support for libdsk).

-u

Show all CP/M file names in upper case.

attrib

Set the file attributes as given.

File attributes

The file attribute string can contain the characters 1,2,3,4,r,s,a,n and m. The meanings of these are:

1-4

The CP/M "user attributes" F1-F4. CP/M does not assign any meaning to these attributes, though MP/M does.

r

The file is read-only. This is the same as using cpmchmod(1) to revoke write permissions.

s

The file is a system file. This attribute can also be set by cpmchmod(1).

a

The file has been backed up.

n

Reset all attributes to zero. So the string "n1r" resets all attributes and then sets F1 and Read-Only.

m

Attributes after an m are unset rather than set. The string "12m34" sets atttributes F1 and F2, and unsets F3 and F4.

Return value

Upon successful completion, exit code 0 is returned.

Errors

Any errors are indicated by exit code 1.

Environment

CPMTOOLSFMT Default format

Files

/etc/cpmtools/diskdefs CP/M disk format definitions

History

  • Debian 13 (Trixie) to Debian 12 (Bookworm): the text shown here
  • Debian 11 (Bullseye) to Debian 9 (Stretch)
  • Debian 8 (Jessie)
  • Debian 7 (Wheezy)
  • Debian 6.0 (Squeeze)
  • Debian 5.0 (Lenny)
  • Debian 4.0 (Etch)
  • Debian 3.1 (Sarge)
  • Debian 3.0 (Woody)

-T since Debian 9 (Stretch); -u since Debian 12 (Bookworm).

Authors

This program is copyright 1997–2021 Michael Haardt <[email protected]> and copyright 2000, 2001, 2011 John Elliott <[email protected]>.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

From cpmtools 2.23-7 in Debian 13 (Trixie). Parsed by carta from the page's man source.