Linux/Ubuntu: How to find large files and directories via SSH
Marc Wagner
July 14, 2022
Using the terminal, you can easily search for files that have a minimum size that you define yourself. The following call searches the entire hard disk for files larger than 10MB and displays them with the path in the terminal.
find / -size +10M -ls
Alternatively, you can specify a directory that you want to search. You only have to specify the path to the directory.
find /var/www/vhosts -size +10M -ls
Or you can abbreviate the whole thing with a dot to search the current directory you are in.
find . -size +10M -ls
If you want to find all files that are between 10MB and 15MB, you can use the following call:
find / -size +10M -size -15M -ls
Artikel von:
Marc Wagner
Hi Marc here. I’m the founder of Forge12 Interactive and have been passionate about building websites, online stores, applications and SaaS solutions for businesses for over 20 years. Before founding the company, I already worked in publicly listed companies and acquired all kinds of knowledge. Now I want to pass this knowledge on to my customers.