Go to main content

man pages section 8: System Administration Commands

Exit Print View

Updated: Thursday, June 13, 2019
 
 

clear_locks(8)

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).

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/core-os

See Also

fcntl(2), attributes(7)