Jump to content

Manual:findOrphanedFiles.php

From mediawiki.org
This page is a translated version of the page Manual:FindOrphanedFiles.php and the translation is 64% complete.

詳細

findOrphanedFiles.php is a maintenance script that finds unregistered files in the 'public' repo zone.

MediaWiki uses the "image/" directory for public images. This script finds images that exist in the public directory but are not registered in the database.

オプション

オプション 説明 必須かどうか
--subdir Only scan files in this subdirectory (for example: "a/a0") 省略可能
--verbose Mention file paths checked 省略可能

使用法

php maintenance/findOrphanedFiles.php [ --verbose| --subdir ]

Basic run

Basic run with verbose

Terminal

よくあるエラー

Local repo uses SHA-1 file storage names; aborting.

This script does not work if your local storage uses SHA-1 hashing.

Could not get file listing.

This error occurs when the directory does not exist or the user running the script does not have permission to read the directory.

If directory does exist, check the file permissions. If you are a root user, you can run script with sudo.

関連項目