Skip to content

mw wiki file usage

Releasev0.35.0 · cfeceb67

mw wiki file usage FILE [flags]

List direct file usage within the selected wiki, with pagination, namespace filtering and deduplication. This does not query cross-wiki/global usage. File identity may be provided by a shared repository, but all API requests stay at the selected wiki and no assets are downloaded.

--format <string>
Format the specified output
--limit <int>
Maximum distinct pages (0 means unlimited) Default: 100.
--namespace <int>
Restrict usage to this namespace ID (default: all)
-o, --output <string>
Output format (jq|json|table|titles) Default: auto.
--anon
Use anonymous access instead of saved credentials
--help
Help for this command
--no-interaction
Do not ask any interactive questions
--password <string>
Wiki login password (or bot password)
--password-file <string>
Read the login password from a file
--profile <string>
Saved profile name or REALM/NAME
--realm <string>
Shared-login realm (wikimedia and wikibase-world are built in)
--username <string>
Wiki login username (use Name@bot for a bot password)
-v, --verbose <count>
Increase output verbosity. Example: --verbose=2 or -vv
--wiki <string>
Wiki URL or API endpoint
Terminal window
mw wiki file usage 'Example.jpg' --namespace 0 --limit 20
mw wiki file usage 'File:Example.jpg' --output titles
Report an issue with this page

Report a documentation issue

The report includes this page’s link, section and documentation version.

Review and submit on Phabricator, or run the command using your saved CLI profile. The command asks before creating the task.