← 返回命令列表

Linux command

faker 命令

文本

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

常用示例

Generate fake name

faker name

Generate fake email

faker email

Generate with locale

faker -l [de_DE] address

Multiple outputs

faker -r [10] name

Generate specific type

faker phone_number

说明

faker is a command-line tool for generating fake data like names, addresses, emails, and phone numbers. It's part of the Faker Python library and supports localized data for many countries. The tool provides numerous data providers covering personal information, company details, internet data, dates, and more. Localization ensures generated data matches regional formats and naming conventions. faker is widely used for testing, database seeding, and development when realistic but non-sensitive data is needed.

参数

-l _LOCALE_, --locale _LOCALE_
Locale for generated data (e.g., en_US, de_DE, ja_JP).
-r _COUNT_, --repeat _COUNT_
Number of values to generate.
-s _SEED_, --seed _SEED_
Random seed for reproducibility.
-o _FORMAT_, --output _FORMAT_
Output format: csv, json, tab.
--help
Display help information.

FAQ

What is the faker command used for?

faker is a command-line tool for generating fake data like names, addresses, emails, and phone numbers. It's part of the Faker Python library and supports localized data for many countries. The tool provides numerous data providers covering personal information, company details, internet data, dates, and more. Localization ensures generated data matches regional formats and naming conventions. faker is widely used for testing, database seeding, and development when realistic but non-sensitive data is needed.

How do I run a basic faker example?

Run `faker name` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -l _LOCALE_, --locale _LOCALE_ do in faker?

Locale for generated data (e.g., en_US, de_DE, ja_JP).