In this article, I will tell you how to find large files on mac using terminal.
1. Why Need To Using Terminal To Find Large Files On Mac?
- Using the Terminal to find large files on Mac can be helpful in several ways.
- It’s faster: Searching for large files through the Finder or a third-party app can be time-consuming, especially if you have a large hard drive with many files.
- In contrast, using the Terminal allows you to quickly search for files by specifying specific criteria such as size, name, or modification date.
- More precise: The Terminal command allows you to specify exactly what you’re looking for in terms of file size and location.
- This can be helpful if you’re trying to find large files in specific directories or exclude certain files from your search.
- Helpful for automation: If you need to run the same search repeatedly, the Terminal command can be automated using scripts or aliases to save time and effort.
- Overall, using the Terminal to find large files on Mac is a powerful tool that can help you efficiently manage your storage space and keep your system running smoothly.
- However, it’s important to be careful when deleting any files that you find, as some may be essential system files needed for your computer to function properly.
2. How To Find Large Files On Mac Terminal.
- You can use the Terminal app on your Mac to find large files by following these steps.
- Open the Terminal app, which you can find in the Applications > Utilities folder.
- Type the following command and press Enter.
sudo find / -type f -size +100M
- This command will search for files larger than 100 MB on your entire computer.
- The `find` command searches for files, while `-type f` specifies that it should only look for regular files (not directories or links). `-size +100M` specifies that it only looks for files larger than 100 MB.
- Note that using `sudo` gives you elevated privileges, which allows you to search all directories on your computer, including system files.
- You can replace `100M` with a different file size if you’re looking for files of a specific size.
- Wait for the command to finish running. It may take a few minutes to complete, depending on the size of your hard drive.
- Once the command is finished, you’ll see a list of all files larger than the specified size. The output will include the file path, size, and date modified.
- Again, be careful when deleting any files that you find using this method to make sure they are not essential system files.