Fdupesは、コンソールからすべての重複ファイルを検索できるコマンドラインツールです。 fslintのようなグラフィカルツールを使用することに対する利点は、もちろん速度です。結局のところ、Linuxコンソールほど速くて便利なものはありません。
Linuxで重複ファイルを探す必要があるのはなぜですか?
遅かれ早かれ使用するオペレーティングシステムに関係なく、コンピュータにはさまざまなサイズのファイルが多数含まれます。十分に注意しないと、それらを繰り返すと、必要なディスク容量が消費される可能性があります。たとえば、40ギガバイトの同じウルトラHD映画を誤って2回ダウンロードしたとします。
UbuntuまたはDebianLinuxにfdupesをインストールするにはどうすればよいですか?
sudo apt install fdupes
または、私たちが好むapt-fastを使用します🙂
sudo apt-fast install fdupes
Fedoraにfdupesをインストールするにはどうすればいいですか?
dnf install fdupes
CentOSにfdupesをインストールする方法 / RHEL ?
yum install fdupes
インストールすると、次のコマンドを使用して重複ファイルを検索できます。
fdupes /path/to/folder
または、再帰的に検索することもできます。その場合、進行状況バーが表示されます
# fdupes -r /path/to/folder
Progress [34248/65545] 80%
Code language: PHP (php)
-Sを使用する オプションを選択すると、複製されたファイルのサイズがわかります。 -dを使用する オプションは、重複したファイルを完全に削除します! fdupes -d / path / to / folder
それ自体では何も削除されません。確認を求められます。
ヘルプについては、コマンドに組み込まれているヘルプを使用できます
fdupes -h
Usage: fdupes [options] DIRECTORY...
-r --recurse for every directory given follow subdirectories
encountered within
-R --recurse: for each directory given after this option follow
subdirectories encountered within (note the ':' at
the end of the option, manpage for more details)
-s --symlinks follow symlinks
-H --hardlinks normally, when two or more files point to the same
disk area they are treated as non-duplicates; this
option will change this behavior
-n --noempty exclude zero-length files from consideration
-A --nohidden exclude hidden files from consideration
-f --omitfirst omit the first file in each set of matches
-1 --sameline list each set of matches on a single line
-S --size show size of duplicate files
-m --summarize summarize dupe information
-q --quiet hide progress indicator
-d --delete prompt user for files to preserve and delete all
others; important: under particular circumstances,
data may be lost when using this option together
with -s or --symlinks, or when specifying a
particular directory more than once; refer to the
fdupes documentation for additional information
-N --noprompt together with --delete, preserve the first file in
each set of duplicates and delete the rest without
prompting the user
-v --version display fdupes version
-h --help display this help message
Code language: JavaScript (javascript)
結論として、この控えめなコマンドは、コンピューター上の重複ファイルを処理し、ディスクの空き領域をより便利な目的に使用するための非常に強力で高速なオプションであると言えます。