xref: /illumos-gate/usr/src/man/man8/clear_locks.8 (revision 533affcbc7fc4d0c8132976ea454aaa715fe2307)
te
Copyright (c) 1996, Sun Microsystems, Inc.
All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
CLEAR_LOCKS 8 "Oct 6, 2004"
NAME
clear_locks - clear locks held on behalf of an NFS client
SYNOPSIS

/usr/sbin/clear_locks [-s] hostname
DESCRIPTION

The clear_locks command removes all file, record, and share locks created by the hostname and held on the current host, regardless of which process created or owns the locks.

This command can be run only by the super-user.

This command should only be used to repair the rare case of a client crashing and failing to clear held locks. Clearing locks held by an active client may cause applications to fail in an unexpected manner.

OPTIONS
-s

Remove all locks created by the current machine and held by the server hostname.

OPERANDS

The following operands are supported: hostname

name of host server

EXIT STATUS
0

Successful operation.

1

If not root.

2

Usage error.

3

If unable to contact server (RPC).

SEE ALSO

fcntl (2), attributes (7)