Skip to content


Finding duplicated files using command line CLI in Linux MacOS Ubuntu

Easy way to find duplicated files in a folder or in all disk

find . -type f -name "*" -print0 | xargs -0 -I {} shasum -a 256 {}

Or course, output the above command to a file, cut -f 1, then sort and pipe it into uniq -c to count duplicates

find . -type f -name "*.JPG" -print0 | xargs -0 -I {} shasum -a 256 {} > finding-duplicates.txt

cat finding-duplicates.txt | cut -f 1 -d ' ' | sort | uniq -c | sort -rn | head -n10

grep 30848de6dba6f90bef4027fbf97a66dcc6f1f2eb3e8a6e47f0e9ce3fc411ce79 finding-duplicates.txt

of course, we now can automate this to keep the first file but move the duplicated into a backup folder before deleting them.

Example of my output on a folder with old photos that got duplicated over type... some photo is now 6x duplicated... time to automate tidying up!

Happy learning,

Antonio Feijao

How to reinstall MacOS with an external bootable disk

  • Update 2022-10 > Apple now has a page with download to all versions in here > "Apple recommends using the latest (newest) macOS that is compatible with your Mac"

How to reinstall MacOS with an external bootable disk installer for Mac operating system. macOS Catalina, macOS Mojave, or macOS High Sierra. You can use an external drive or secondary volume as a startup disk from which to install the Mac operating system.

This article was inspired after I helped a friend recover their Mac operating system and documents. Having an external drive with macOS help and did a quick install. external-disk-with-various-macOS-versions

After installing from an offline version, do run the Apple software update to get the latest updates and versions. You can also run from the command line sudo softwareupdate -ai.

The purpose of this post is to share the links from for the installation of the various Mac operating system versions.

How to create a bootable installer for macOS

How to upgrade to macOS Catalina

How to upgrade to macOS High Sierra

How to upgrade to macOS Mojave


How to upgrade to OS X El Capitan

How to reinstall macOS from macOS Recovery

Always have a backup of your data. Use at your own responsibility and happy learning,

Happy learning

Antonio Feijao UK