← 返回命令列表

Linux command

licensecheck 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Check files for licenses

licensecheck [file]

Check directory recursively

licensecheck -r [directory]

Output in machine-readable format

licensecheck --copyright -m [file]

Check specific file types

licensecheck -r --check '*.py' [directory]

Show only files with licenses

licensecheck -r -l [directory]

说明

licensecheck scans files for license information and copyright statements. It examines source code headers to identify the license under which files are distributed. The tool recognizes many common open-source licenses including GPL, MIT, BSD, Apache, and others.

参数

-r, --recursive
Check directories recursively.
-l, --lines _n_
Check first n lines (default 60).
-c, --check _regex_
Check only matching filenames.
-i, --ignore _regex_
Ignore matching filenames.
-m, --machine
Machine-readable output.
--copyright
Show copyright statements.
-v, --verbose
Verbose output.

FAQ

What is the licensecheck command used for?

licensecheck scans files for license information and copyright statements. It examines source code headers to identify the license under which files are distributed. The tool recognizes many common open-source licenses including GPL, MIT, BSD, Apache, and others.

How do I run a basic licensecheck example?

Run `licensecheck [file]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -r, --recursive do in licensecheck?

Check directories recursively.