GNU Emacs 32.0.50 (9008bf64c3) のマニュアルを PLaMo 翻訳で機械翻訳したものです。誤訳を含むことがあります。原文: https://www.gnu.org/software/emacs/manual/html_node/emacs/Flagging-Many-Files.html ・ emacs-doc.conao3.com

32.4 多数のファイルを一度にフラグ立てする

#、~、.、% &、および% dコマンドは、ファイル名に基づいて多くのファイルを削除対象として指定します:

#

Flag all auto-save files (files whose names start and end with ‘#’) for deletion (see Auto-Saving: Protection Against Disasters).

~

すべてのバックアップファイル(ファイル名が ‘~’ で終わるファイル)を削除対象としてマークします(バックアップファイルを参照)。

. (Period)

削除対象の数値超過バックアップファイルにフラグを立てます。各ファイルの最古および最新の数件のバックアップファイルは除外され、その間のファイルにフラグが立てられます。

% &

容易に再作成できることが推測される特定の種類の名前を持つファイルをすべて削除するためのフラグ。

% d regexp RET

正規表現 regexp に一致する名前のファイルをすべて削除するフラグ。

# (dired-flag-auto-save-files) は、ファイル名が自動保存ファイルのように見えるもの――つまり、ファイル名の先頭と末尾が ‘#’ であるファイル――すべてにフラグを立てます。自動保存:災害対策を参照してください。

~ (dired-flag-backup-files) は、ファイル名にバックアップファイルである旨が記載されているすべてのファイル(つまり、ファイル名が ‘~’ で終わるファイル)を指定します。バックアップファイルを参照してください。

. (period, dired-clean-directory) flags just some of the backup files for deletion: all but the oldest few and newest few backups of any one file. Normally, the number of newest versions kept for each file is given by the variable dired-kept-versions (not kept-new-versions; that applies only when saving). The number of oldest versions to keep is given by the variable kept-old-versions.

C-u 3 . のように正の数値引数を指定すると、dired-kept-versions を上書きして、保持する最新バージョンの数を指定します。負の数値引数は kept-old-versions を上書きし、引数の値の符号を反転させた数を用いて、各ファイルの保持する最古バージョンの数を指定します。

% & (dired-flag-garbage-files) は、変数 dired-garbage-files-regexp で指定された正規表現にファイル名が一致するファイルをマークします。デフォルトでは、TeX によって生成される特定のファイル、‘.bak’ ファイル、および patch によって生成される ‘.orig’ および ‘.rej’ ファイルがこれに該当します。

% d は、指定した正規表現(dired-flag-files-regexp)に一致するすべてのファイルにフラグを立てます。マッチングには、ファイル名のディレクトリ以外の部分のみが使用されます。‘^’ および ‘$’ を使用して、マッチ箇所を固定できます。% d を使用する際に特定のサブディレクトリを非表示にすることで、マーク対象から除外できます。サブディレクトリの非表示を参照してください。