# flock を Homebrew, apk, MacPorts, Nix, winget でインストール

flock のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

```sh
sudo av install brew:flock
```

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install flock
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install flock
```

  証拠: MacPorts ports tree: sysutils/flock/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add flock
```

  証拠: Alpine Linux edge package indexes: flock from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#flock
```

  証拠: nixpkgs package indexes: pkgs/by-name/fl/flock/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

### Windows

- winget (92%):

```sh
winget install --id FlockFZ.Flock -e
```

  証拠: Windows Package Manager source index: FlockFZ.Flock from https://cdn.winget.microsoft.com/cache/source.msix

## パッケージ情報

- **パッケージキー:** brew:flock
- **パッケージマネージャ:** Homebrew
- **パッケージマネージャページ:** <https://formulae.brew.sh/formula/flock>
- **バージョン:** 0.4.0
- **ソース概要:** Lock file during command
- **ホームページ:** <https://github.com/discoteq/flock>
- **リポジトリ:** <https://github.com/discoteq/flock>
- **上流ドキュメント:** <https://github.com/discoteq/flock#readme>
- **ライセンス:** ISC
- **ソースアーカイブ:** <https://github.com/discoteq/flock/releases/download/v0.4.0/flock-0.4.0.tar.xz>
- **生成日時:** 2026-07-08T18:08:21+00:00

## 実行可能ファイル

- flock (cli)
- flock (エイリアス)

## インストール挙動

- post-install フック: 未定義
- Bottle: 利用可能 対象 arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## バージョンと鮮度

- ページ生成日: 2026-07-08
- マネージャ版: 0.4.0
- ローカルデータ: OK
- 上流リポジトリ: https://github.com/discoteq/flock
- 情報: No package-manager update timestamp was available.
- 情報: No cached GitHub release or tag data was available.
## プロジェクトの歴史と使われ方

discoteq flock(1) is a portable command-line implementation of the Unix file-locking utility. It exists for systems where the util-linux flock(1) command is absent, inconvenient, or not portable enough.

### プロジェクトの歴史

The project README explicitly frames the package as an answer to the question of why another flock(1) exists when util-linux already includes one. Its distinguishing goals are support across Linux, Illumos, Darwin, and FreeBSD, testing of major behavior and edge cases, an ISC license, and public source and issue tracking.

The GitHub release history dates the public package line at least to v0.1.1 in 2014, with later v0.2.x releases in 2014 and 2015 and a v0.4.0 release in 2020.

### 採用の歴史

The package is especially relevant on macOS and other non-Linux Unix-like systems because the README gives Homebrew and MacPorts installation paths. The supplied package facts also list Alpine, Nix, and other package-manager entries.

Its adoption pattern is practical rather than framework-driven: shell scripts, cron jobs, backups, and deploy tasks use flock to serialize work with a lock file.

### 使われ方

The common usage is to run flock with a lock-file path followed by a command, such as protecting an echo or rsync invocation so only one instance proceeds at a time.

Because it is a small system utility, its value is in predictable process coordination from shell scripts without embedding lock handling into each script.

### パッケージ好きにとっての重要性

For package maintainers, discoteq flock is a good example of packaging a small compatibility utility to make Unix scripts more portable across distributions and operating systems.

It matters in package-manager culture because the command name overlaps with a util-linux tool: correct formula naming, conflict handling, and platform behavior are the interesting parts, not a large dependency graph.

### タイムライン

- 2014: Public GitHub releases include v0.1.1 and v0.2.0.
- 2015: The v0.2.x release series continues.
- 2020: v0.4.0 is released with source tarball installation instructions referenced by the README.

### Related projects

- util-linux provides the well-known Linux flock(1) implementation that this project compares itself with.
- bats-core is used by the project test suite.

### ソース

- <https://github.com/discoteq/flock>
- <https://github.com/discoteq/flock/releases>


## セキュリティノート

flock に一致するローカルシークレット処理マニフェストは見つかりませんでした。将来の対応で安定したパッケージ URL を使えるよう、Nucleus パッケージメタデータはここに公開されています。


## ソースデータベース詳細

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** flock
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## 他のパッケージマネージャ記録

- Nix - flock: normalized package name match | nixpkgs package indexes: pkgs/by-name/fl/flock/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - flock - 2.42-r0: normalized package name match | Alpine Linux edge package indexes: flock from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | File locker from util-linux | https://git.kernel.org/cgit/utils/util-linux/util-linux.git
- MacPorts - flock: normalized package name match | MacPorts ports tree: sysutils/flock/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- winget - FlockFZ.Flock: normalized package name match | Windows Package Manager source index: FlockFZ.Flock from https://cdn.winget.microsoft.com/cache/source.msix


## 関連リンク

- [Source-control packages](https://www.automicvault.com/ja/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/ja/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/ja/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://www.automicvault.com/ja/pkg/brew-utility-packages/) - Matched curated package taxonomy and local package facts.
- [gascity](https://www.automicvault.com/ja/pkg/brew/gascity/) - Popular package that depends on this formula.
- [adr-tools](https://www.automicvault.com/ja/pkg/brew/adr-tools/) - Local package facts share a topical domain. Shared terms: file.
- [afuse](https://www.automicvault.com/ja/pkg/brew/afuse/) - Local package facts share a topical domain. Shared terms: file.
- [age](https://www.automicvault.com/ja/pkg/brew/age/) - Local package facts share a topical domain. Shared terms: file.

## Combined YAML source

View the package source record on GitHub. [combined/flock.yml](https://github.com/automic-vault/db/blob/main/combined/flock.yml)


## ソース

- Nucleus package database
- package-page enrichment
- curated package history
- package version freshness
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
