Hi Andrey,
The best way to find and remove duplicate files for Mac via command line is to use the command line tool fdupes. Fdupes is a command line tool that can be used to quickly and easily find and delete duplicate files on your Mac. To use fdupes, open a Terminal window and type the command:
fdupes -r [directory]
Replace [directory] with the directory you want to search for duplicate files. Once you have entered the command, fdupes will scan the directory and list all duplicate files it finds. You can then delete the duplicate files by typing the command:
fdupes -d [directory]
Again, replace [directory] with the directory you want to delete the duplicate files from.