[Guide to AmigaDOS 3\Lock]
Format: LOCK <drive> [ON|OFF] [<passkey>]
Template: DRIVE/A, ON/S, OFF/S, PASSKEY
Purpose: To set the write protect status of a device.
LOCK sets or unsets the write protect status of a device or partition. The
LOCK remains on until the system is rebooted or until the LOCK is turned off
with the LOCK OFF command.
An optional passkey may be specified. If the passkey is used to lock a hard
disk partition, the same passkey must be specifed to unlock the partition.
The passkey may be any number of characters in length.
1> LOCK Work: ON SecretCode
The Work: partition is locked. You can read the contents of Work: with
commands like DIR, LIST or MORE, but you cannot alter the contents of the
partition. If you try to edit the contents of a file on Work:, a requester
will appear stating that Work: is write-protected. For example, if you try
to create a new directory by entering the following:
1> MAKEDIR WORK:Test
The following message will appear:
Can't create directory Work:Test
Disk is write-protected
To unlock the partition, enter:
1> LOCK Work: OFF SecretCode
The locking of a device is only good for the duration of the current session.
Resetting or turning off the Amiga cancels the locking of the device.
Converted from AmigaGuide format to basic HTML by Jaruzel.