2 Ways To Find Duplicate Files On a Mac

  Рет қаралды 37,344

macmostvideo

macmostvideo

Күн бұрын

macmost.com/e-2724 If you suspect that you have some large duplicate files on your Mac, you can find them without any special software. You can use the Finder to search for files and sort them so duplicates are together. You can also use the Terminal to find duplicates with a multi-part command.
FOLLOW MACMOST FOR NEW TUTORIALS EVERY DAY
▶︎ KZfaq - macmost.com/j-youtube (And hit the 🔔)
▶︎ KZfaq Email Notifications - macmost.com/ytn ⭐️
▶︎ MacMost Weekly Email Newsletter - macmost.com/newsletter ✉️
SUPPORT MACMOST AT PATREON
▶︎ macmost.com/patreon ❤️
00:00 Intro
00:45 Using the Finder
02:31 Terminal Command
05:26 How It Works
#macmost #mactutorial

Пікірлер: 99
@jimalix6270
@jimalix6270 2 жыл бұрын
Great video, as always, Gary! I'm just beginning to learn BASH scripting and terminal commands, and so I *understand* what you're doing, even though I could never have come up with this process on my own.
@tomvallee1768
@tomvallee1768 2 жыл бұрын
Excellent info on every broadcast. And quick-moving without the fluff. Thanks.
@bitsmith
@bitsmith 2 жыл бұрын
Fantastic "one liner"! Just used it to find a ton of dups in my Documents folder - thank you!
@angelopetrelli1083
@angelopetrelli1083 2 жыл бұрын
Man, all of your videos are so good!!!! Thank you very much!!!! 👍⭐👍⭐👍⭐👍⭐👍⭐👍⭐👍⭐👍⭐👍
@bala1000mina
@bala1000mina Жыл бұрын
Thank you so much Gary! Very helpful!
@mnmleung
@mnmleung Жыл бұрын
Thank you for a very useful video, succinctly explained.
@smiley_joe
@smiley_joe 9 ай бұрын
Just saved me so much time. Thank you!
@user-lx6yi9vn7e
@user-lx6yi9vn7e 9 сағат бұрын
Gary you ROCK
@stingus
@stingus Жыл бұрын
Hi Gary! Got my first mac 2 months ago after 20 years of using Windows. So now I'm blazing through your videos in search of useful tips and I really tell that you know a lot and you are a really smart guy! Meanwhile, in this video you show up a terminal script that search for the duplicates but it is extremely inefficient to me. It works for some small amounts of files but will take a really long time if you run it for hundreds of gigabytes of data, because it will take a ton of processing power and time to hash all the data. It will also get WAAAAAAY slower if you run same task for the files that are stored on the slow HDD storage. I'm talking hours and even days slower. It also put unnecessary wear on the storage since you have read every single byte of data to hash everything. You can optimize this process to be way more efficient by searching for the files of the same size first, then calculate the hashes of the same sized files and then compare the hashes. This way you will be hashing just the files that are the same size (files have to be the same size to be duplicates) saving just absurdly huge amount of time and resources. I'm not good enough with terminal commands yet, so I can't offer such command myself but you probably can remake it in the described way and make another video about it :) Thank you for your videos!
@organizersrus
@organizersrus 4 ай бұрын
You are awesome! Thank you so much for this video!
@paulreinert6255
@paulreinert6255 Жыл бұрын
outstanding! thanks Gary
@williamhalstediq
@williamhalstediq 2 жыл бұрын
Great video 🌺
@heatmizer9172
@heatmizer9172 8 ай бұрын
You Sr. Have saved me some much time and space on my hard drive you are a life saver
@boopfer387
@boopfer387 Жыл бұрын
Yes very useful Gary !
@MediaChess
@MediaChess 2 жыл бұрын
Unbeliveabe easy, and very useful.
@dereknicolas7635
@dereknicolas7635 Жыл бұрын
This guy has a gift of teaching things, he makes things people like mnyself have no knowledge on and making the topic extremely clear and understanable. Many thanks @macmostvideo
@jefftalley
@jefftalley 2 жыл бұрын
Brilliant!
@debjones4712
@debjones4712 2 жыл бұрын
Neat, neat, neat! Thanks
@masonshakes4756
@masonshakes4756 Жыл бұрын
Thanks!
@desertpatient
@desertpatient 2 жыл бұрын
Thanks bunches
@sircorn4248
@sircorn4248 2 жыл бұрын
Excellent video, as always. I would not stop on that, though. I would (and I will) make an application with this code using Automator.
@macmost
@macmost 2 жыл бұрын
Or, Shortcuts...
@mirothedjplaylist
@mirothedjplaylist Жыл бұрын
Every person who owns a mac needs this as a pre-requisite. TY
@loisskiathitis8926
@loisskiathitis8926 2 жыл бұрын
A very useful and informative video tutorial today! Thank you, Gary! 👏🏻❤️
@linuxxxunil
@linuxxxunil Жыл бұрын
impressive. i have a demo copy of macpaw gemini. it will find the dupes but wants an activation code to finish the job so I was just using it to 'find' the duplicates. Yours is much better. Back in the 90s I would use tax software to do all the calculations but you had to pay in order to print the tax return. So i just copied all the numbers by hand to the paper return.
@vidvertise001
@vidvertise001 Жыл бұрын
Gary, Great content and delivery! I am trying to figure out how to find duplicate files on multiple external drives. I want to clean out unnecessary files to make room for TimeMachine to do its thing. Any help would be appreciated. Thanks
@williameverets2736
@williameverets2736 Жыл бұрын
I found it thank You
@richardpowell4667
@richardpowell4667 Жыл бұрын
Hi, that's pretty cool. Do you think there would be a way to print /send the information to a file (in it is the checksum and filename at least), then modify that file to delete any of the obvious files? If there is a way, would you recommend it? Also, how would you do that? In DOSshell I can do all that but having long filenames makes it so much more specific and dangerous, at least in DOS.. Thanks
@macmost
@macmost Жыл бұрын
You could use some Terminal command things to send the results here to a file. But what I honestly do in cases like this is to just copy and paste into TextEdit or something and work from there. You could just go through and then copy and paste lines from one document to another to narrow down files to check out, or put * in front of some lines, etc.
@Xcenda
@Xcenda Жыл бұрын
Hi Gary, thanks for your very helpful videos. I find my self in a situation where I made several copies of my entire hdd as a backup. Now I'm making a big storage and all my old hdd's will be copied there. This will take mote than 10TB of data and I know there is a lot of duplicates. Is there a way how to batch select all the duplicates and delete them? If I'm not mistaken I can't do anything like that in Terminal. But could this task be done in Automator?
@macmost
@macmost Жыл бұрын
Nothing automatic will really know what it is dealign with and how things are organized.
@joelmorrasca9810
@joelmorrasca9810 2 жыл бұрын
Wondering if there’s such thing as a batch file on macOS, this way you could just drag the file into the directory you want and search it easily, no need to go through terminal and find the command to copy paste
@saradooo
@saradooo Жыл бұрын
Great video Gary ! How can I move those identified duplicate files into a separate folder where I can manage/remove files manually? Thank you
@macmost
@macmost Жыл бұрын
If you find something you want to delete, you can just go to that folder and delete it.
@ozespresso
@ozespresso Жыл бұрын
Hello Gary and thank you for another great video! I am wondering if there is a way to add a command that will delete the duplicates? Say I have 100 Giga of photos and backup photos and there are a lot of duplicates and I just want to keep the ones that are not duplicates. Thank you again, Yossi
@macmost
@macmost Жыл бұрын
Probably, but I would be very wary of using a script that decided what to delete for you. It is too easy to make a mistake or overlook something and delete valuable photos.
@ozespresso
@ozespresso Жыл бұрын
@@macmost Appreciate the feedback
@davidsummers2616
@davidsummers2616 2 жыл бұрын
on you mac the get info. How do you uncheck Multiple Boxes ? like The Locked in photos can you do a video on this
@mojoblues66
@mojoblues66 2 жыл бұрын
Great video, as always. BTW, on partitions formatted with APFS, duplicates don't take up extra space.
@macmost
@macmost 2 жыл бұрын
Clones don't take up space. If you take a file and make a duplicate of it, it is a clone and doesn't use space. But say if you download a file once, and then later download the exact same file again, it will be there twice.
@mojoblues66
@mojoblues66 2 жыл бұрын
@@macmost I did some research (which perhaps I should have done *prior* to making this comment), and you are, of course, correct. To be more precise, in order to create a clone on APFS, the clonefile(2) syscall has to be used. Examples would be ⌘D in the Finder, or "cp -c" on the command line. APFS does not check a new sector against a database of existing sectors like ZFS does, and therefore downloading the same file twice will not create a clone.
@jcinaz
@jcinaz 2 жыл бұрын
Most duplicates are going to be found in Downloads caused by people clicking on the same online document to view it. The filename of the duplicates will be followed by a number, like -1, -2, etc., or like (1), (2), etc.
@emanuel_soundtrack
@emanuel_soundtrack 2 жыл бұрын
duplicar]te file finder app is my best friend there!
@jemimampg1564
@jemimampg1564 Жыл бұрын
Hello Gary, thank you for the video. I have a MacBookPro with El Capitan. What App could I use to find duplicates in the PHOTOS APP? I have too many pictures to do it one by one. THanks for your help!
@macmost
@macmost Жыл бұрын
Don't use some "app" to do it. Your photos are too valuable. If you have too many, just do it 5 minutes here and 5 minutes there.
@jemimampg1564
@jemimampg1564 Жыл бұрын
@@macmost You are right Gary, thank you so much for your advice!
@atlanticx100
@atlanticx100 2 жыл бұрын
A fantastic way to do it for free I use a paid version "Gemini". I did not realize the command line could do it thankyou.
@garymcadamspa8450
@garymcadamspa8450 Ай бұрын
When I back up my Mac using Time Machine is it duplicating the same files on the external hard dive every time? I have a 1 TB external hard drive that I only use for Time Machine. It is is full and my 500 GB Mac hard drive isn't full.
@macmost
@macmost Ай бұрын
No. It is incremental.
@farrokhmabhouti9257
@farrokhmabhouti9257 2 жыл бұрын
Hi Gary, I am using Numbers for my invoicing. Could I ask how can I add up only one cell in each sheet with number which indicates service fee? By end of financial year, the number of the sheets (invoices)could be over 300. Your help would be very much appreciated. Regards, Frank
@macmost
@macmost 2 жыл бұрын
That will be difficult to do. 300 sheets? You could try to use the INDIRECT function if things are very consistent across sheets. Or, maybe come up with a better way than creating a new sheet for each invoice. Have you seen this? kzfaq.info/get/bejne/qMWChdOLzbunqoU.html I should also add that you may be better off using dedicated billing software (or service) that fits whatever business you run. What do others in your field use for billing?
@farrokhmabhouti9257
@farrokhmabhouti9257 2 жыл бұрын
@@macmost Thank you for quick reply Gary. Majority of others they are using hard copy invoices. But as you mentioned, I will try to find an invoicing software.
@pass-my-test
@pass-my-test Жыл бұрын
can you add that string to the description?
@chucksaeger7500
@chucksaeger7500 Ай бұрын
So what do you do with the duplicates? Do these duplicate files affect performance in any way? I have what appears to be quite a few duplicates and wonder what I should do with them. Thanks man!
@macmost
@macmost Ай бұрын
If they are true duplicates (exactly the same file in two separate locations on the same drive) then I would assume you want to get rid of one of them to free up space. How much space you have available on your drive could affect performance, but as long as you have 10% or more free, as a general rule, you are fine. Make sure these really are duplicate files though. Like make sure you aren't seeing the same file in the folder and also in "Recents" or something like that.
@chucksaeger7500
@chucksaeger7500 Ай бұрын
@@macmost Thanks man! You’re the best!
@betemulugeta9782
@betemulugeta9782 Жыл бұрын
Hi Gary, I have a folder 📁 on my MacBook Air which contains family pictures and videos. The 📁 location is on the desktop and it's very large. I want to remove the duplicates before I copy the folder to the external hard drive. Can you please help me who to remove the duplicated photos and videos from a folder on MacBook ( please note that the files are not on photos app). Thanks for your time
@macmost
@macmost Жыл бұрын
How about using the methods in this video? Or, come up with a technique based on this situation. Obviously the files can't be exact duplicates (can't have a file with the same name, same location). So what do the duplicates have in common? How are the files different in some way?
@betemulugeta9782
@betemulugeta9782 Жыл бұрын
@@macmost There are around 37 sub-folders within the main (mother) folder. These sub-folders are arranged using some chronological or even or any other significant order. Hence, some pictures can be found in more than one folder.
@macmost
@macmost Жыл бұрын
@@betemulugeta9782 Sounds like you've created quite a mess. How about searching for images in the main folder so you see everything in one list, regardless of the subfolder. Then sort by name and you'd see the duplicates that way and work through them.
@betemulugeta9782
@betemulugeta9782 Жыл бұрын
@@macmost I agree it's a big mess. Didn't know this coming as it has been built gradually over time. I will try your suggestion, thank you for your help and time.
@parsathil4438
@parsathil4438 Жыл бұрын
3rd party software seems like a much more convenient solution?
@soulinspiration1
@soulinspiration1 Ай бұрын
Ok I wished you had included the terminal command in the description.
@macmost
@macmost Ай бұрын
I do. Click on the link at the very start of the description to go to my site where I include such things.
@lallu2004
@lallu2004 2 жыл бұрын
Does this work also with an external drive?
@macmost
@macmost 2 жыл бұрын
Sure. Try it.
@DaveKingMusic
@DaveKingMusic Жыл бұрын
Hi. I thought you said the code would be in the notes for the video, but I don't see it. Is the code available somewhere? Thank you.
@macmost
@macmost Жыл бұрын
It is. It is in the notes for the post at my site. The link is the very first thing in the description here.
@DaveKingMusic
@DaveKingMusic Жыл бұрын
@@macmost Thank you!
@ebutuoy6701
@ebutuoy6701 2 жыл бұрын
I either get a "permission denied" message, or nothing happens. In the "nothing happens" case, I have duplicated a file intentionally before starting the terminal command. 🤔
@paulcamalin5236
@paulcamalin5236 2 жыл бұрын
Gary I was waiting to see if you show a way to actually delete the duplicates. That is really the whole purpose of finding duplicates. I have1000s of pictures and I would say 30% of them are duplicates. I know there are software that you buy that do that but does apple have a way to delete the duplicates?
@macmost
@macmost 2 жыл бұрын
Do you mean file duplicates? Or duplicates in the Photos app. I'll assume files, since that is what this video is about. The purpose of this script is to see where you have a problem. But I'm not a fan of "automatic" deletion of anything. First, I'd figure out why you have 300 duplicate images to make sure it doesn't happen again. As for how to delete them, it depends on the situation. Obviously they can't be in the same folder (won't allow files of the same name), so it is hard to list them in the Finder. A Smart Folder may work to have them all listed together, but without knowing the details it is hard for me to advise.
@gee-rockgee-rock4468
@gee-rockgee-rock4468 Жыл бұрын
now how do you delete the 2nd copy and keep just one
@macmost
@macmost Жыл бұрын
Delete it just like you would delete any file. It won't do it for you automatically, and nothing like this ever should. Deleting files is serious and you should carefully look at each file and make a conscious decision.
@Mangold108
@Mangold108 23 күн бұрын
why so hard a simple task that could be in finder easily?
@dragonlord0666
@dragonlord0666 Жыл бұрын
so this would not work if you had two folders in different locations - say one on the desktop and one on a external drive. you'd need to copy the desktop folder to the external drive then run the command on the external drive. once you had the duplicates you'd need to check what folder they are in to make sure you deleted the old desktop version (or which ever version you did not want) unless I'm missing something with the find . command
@macmost
@macmost Жыл бұрын
Sounds like what you want to do is to compare the contents of two folders, not find duplicates throughout the drive. Yes, I would come up with some different method for that. Not sure of the situation where this would be needed though.
@dragonlord0666
@dragonlord0666 Жыл бұрын
yes I guess compare (diff) would work better. I presume it will check both folder & drive and tell me if files exist on either or both locations if I use the -rq I think switches if a file is only in the desktop folder I'd then need to copy/move it to the external drive I do run dupeguru (free) now and then but I have found it sometimes says no duplicates when I know there are (just not always how many duplicates) so I'm looking for a way to check. the reason for my thinking was, I often find old drives that contain files and I'll copy the drive to a folder on the desktop (more so if the drive is not 100% stable on mounting) and then I can 'go through it' to see if the files are already on my system or not by finding duplicates.
@adamnealis
@adamnealis 2 жыл бұрын
I would use md5 instead of cksum. Even sha256 as md5 is considered weak.
@macmost
@macmost 2 жыл бұрын
In what sense? We aren't encrypting files here. We are looking for a way to compare files. Very different tasks.
@adamnealis
@adamnealis 2 жыл бұрын
@@macmost it's because the md5 or sha checksums are much less likely than cksum to generate the same result for two different files. I'm splitting hairs. Nothing to do with encryption. Of course, cmp tells you unequivocally if two files are identical, but you would have to work out a much more complex command to use cmp.
@macmost
@macmost 2 жыл бұрын
@@adamnealis I think cksum plus file size probably makes it astronomically improbable for a false positive though. Haven't tried md5 or sha to see how they work in this code, Wonder if it is a major speed hit too.
@adamnealis
@adamnealis 2 жыл бұрын
@@macmost I agree the odds are low. cksum produces a 32 bit checksum, md5 a 128 bit and sha256 a 256 bit checksum. I know md5 is optimised to be fast.
@Corihogg
@Corihogg Жыл бұрын
Can you post the command please?
@macmost
@macmost Жыл бұрын
Click on the link at the very start of the description to go to the post page for this video at my site. I posted it there.
@meeluanistyn1644
@meeluanistyn1644 2 жыл бұрын
My bad habit is to take screen grabs e.g. of photos and then, a few days later, I inadvertently repeat this and end up with duplicates. I've used third party apps to find duplicates and they're pretty good. However they don't always pick up all duplicates e.g. if I deliberately save two copies of the same photo as a test to see if they're found. Looks like your method may be worth trying.
@ratchetize
@ratchetize 3 ай бұрын
Confusing
@tejloro
@tejloro 2 жыл бұрын
Why am I getting "grep: -: No such file or directory" on this command?????
@macmost
@macmost 2 жыл бұрын
Maybe no duplicates are found?
@tejloro
@tejloro 2 жыл бұрын
@@macmost I double checked the spelling AND I guaranteed there are duplicates (to test it out)...
@macmost
@macmost 2 жыл бұрын
@@tejloro Not sure what the problem could be then. Permissions maybe? Is your account an admin or standard account?
@tejloro
@tejloro 2 жыл бұрын
@@macmost /tmp/filelist.tmp is being created and filled...
@macmost
@macmost 2 жыл бұрын
@@tejloro Are you using Monterey and zsh? Other than a typo, I can't think of why it wouldn't be working for you then, sorry.
@Travel_DNA
@Travel_DNA 2 жыл бұрын
This would not work with duplicate photos as there are so many photos taken with the same file size.
@macmost
@macmost 2 жыл бұрын
Probably not exactly the same file size since compression would affect that. Plus, this uses a checksum on the bytes in the file, not just size.
@Mangold108
@Mangold108 23 күн бұрын
I FOUND DUPEGURU...
@williameverets2736
@williameverets2736 Жыл бұрын
Way to advance for my Brain.
@stefanoconti451
@stefanoconti451 Жыл бұрын
Hello Gary, thank you for your great tutorials which have often been very useful for me. Now I am stuck with a duplicate file problem and I hope you can help. In short, I have a mid 2015 iMac running Big Sur. I use Mail for emails and I have nearly 20 years of email messages stored in different mailboxes. When I use Mail to look inside any single mailbox (e.g. WORK_2020) I can see a number (e.g. 3000) of email messages with their respective attachments. However, when I look at the same WORK_2020 mailbox folder within the ~Library/Mail/etc directory I find a much bigger number (something like 4800 or more) of .emlx files, corresponding to multiple copies of each email message. I suspect that this is what slows the Mail app and causes occasional crashes. My question is: is there a way to find and delete these duplicates ? I will add that I already tried a number of duplicate finder apps but none was able to solve the problem. Actually, only the "Duplicate File Finder" app does spot some but not all duplicate messages while other apps do not find any duplicate. Of course I followed your instructions in this video (kzfaq.info/get/bejne/o9t0m6ydvMmYiZc.html) but it does not work for me. I believe that in the case of .emlx files there is some additional complication, i.e. each multiple copy of the same email message has a different file size and different checksum. I can only confirm that these are the same email message by opening each one separately in Mail and check that the sent and received date and time are the same. Sorry for being so long. I hope you can suggest some solution. With my best regards Stefano Conti
You Are Using These Folders On Your Mac Wrong
11:18
macmostvideo
Рет қаралды 180 М.
10 Things You Should Know About Naming Files on a Mac
11:47
macmostvideo
Рет қаралды 37 М.
Scary Teacher 3D Nick Troll Squid Game in Brush Teeth White or Black Challenge #shorts
00:47
Я нашел кто меня пранкует!
00:51
Аришнев
Рет қаралды 4,9 МЛН
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 11 МЛН
Does size matter? BEACH EDITION
00:32
Mini Katana
Рет қаралды 19 МЛН
Find & Delete Duplicate Files on Any Windows PC for Free! 2023
14:48
The 4 Basic Techniques Every Mac User Needs To Master
9:54
macmostvideo
Рет қаралды 186 М.
How To Fix These 10 Mac Finder Annoyances
10:05
macmostvideo
Рет қаралды 117 М.
Understanding the File And Folder Structure Of Your Mac
11:27
macmostvideo
Рет қаралды 372 М.
Mac Settings That ACTUALLY Make A Difference
11:23
FromSergio
Рет қаралды 470 М.
Think You Have Duplicate Files Or Photos? Maybe Not!
10:00
macmostvideo
Рет қаралды 9 М.
How to Organize Photos on a Mac with Apple Photos
21:40
Pixologie - The Photo Estate Company
Рет қаралды 8 М.
Understanding Finder Window Position, Size and View Settings
10:44
macmostvideo
Рет қаралды 21 М.
The Truth About SIM Card Cloning
13:04
Janus Cycle
Рет қаралды 1,1 МЛН
НИКОГДА не иди на сделку с сестрой!
0:11
Даша Боровик
Рет қаралды 729 М.
для всей семьи
0:56
Стакановец
Рет қаралды 191 М.
Массаж головы пранк🤣
0:55
Kirya Kolesnikov
Рет қаралды 5 МЛН
Абзал неге келді? 4.10.22
3:53
QosLike fan club
Рет қаралды 31 М.
Robot 🤖 cleaning 🧹
0:57
Bunnal 𝚃𝚎𝚌𝚑
Рет қаралды 4,7 МЛН