简体   繁体   English

在一组备份中选择唯一的 .mp3 文件。 Mac, Unix

[英]Select unique .mp3 files in a set of backups. Mac, Unix

I am currently reorganizing all my backups.我目前正在重组我的所有备份。 I have the problem that in those various backups there are both different and same .mp3 files.我遇到的问题是,在这些不同的备份中,既有不同也有相同的 .mp3 文件。

I was wondering if there is a program or code for mac which can search for all the .mp3 files in a map and it's underlying maps/directory's.我想知道是否有适用于 mac 的程序或代码可以搜索地图中的所有 .mp3 文件及其底层地图/目录。 And if possible the program also copy unique versions of those .mp3 files to another directory.如果可能,该程序还将这些 .mp3 文件的唯一版本复制到另一个目录。

With kind regards, Bigsortvids亲切的问候, Bigsortvids

After a lot of time searching on google and other forums and by trying I have found the following command as an answer:在谷歌和其他论坛上搜索了很多时间并尝试后,我找到了以下命令作为答案:

find /fromWhichDirectory "*.mp3" -type f -print0 | xargs -0 -I '{}' mv "{}" /toWhichDirectory

!!!! !!!! PAY ATTENTION that when you don't end the command with ctrl+c and you delete the files that where moved or copied to the toWhichDirectory terminal will try to replace the files with the files from fromWhichDirectory which in the case of moving(mv) you get irritating errors and in the case of copying(cp) all the files will be copied again.请注意,当您不使用 ctrl+c 结束命令并删除移动或复制到 toWhichDirectory 终端的文件时,将尝试用 fromWhichDirectory 中的文件替换这些文件,在移动 (mv) 的情况下,您得到恼人的错误,在复制(cp)的情况下,所有文件都将被再次复制。

I just wanted to delete some(3000) .mp3 files that didn't fit in the row and they just appeared again.我只是想删除一些(3000).mp3 文件,这些文件不适合该行,然后它们又出现了。 Very irritating and long process, took me an hour to delete all the right mp3 files and empty the trashcan.非常烦人和漫长的过程,我花了一个小时删除所有正确的 mp3 文件并清空垃圾桶。 I had to remove almost 100gb of mp3 );我不得不删除近 100GB 的 mp3 );

Hope I helped someone with this answer, greetings, Bigsortvids希望我能帮助某人回答这个问题,问候,Bigsortvids

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM