How to find large files on a server via SSH

Continuing our series on handy commands to know os one that helps you find large files on your server via SSH.

SSH command for finding files larger than a certain file size

The command for this is quite easy, for our example we will assume you want to find all files that are larger than 1 GB in size and geta list you can use.

Step one: Go into your SSH session and type:

find / -type f -size +1048576k -exec ls -lh {} \; 2> /dev/null | awk ‘{ print $NF “: ” $5 }’  | sort -nrk 2,2

Done! That was easy.

Want to discuss a project?

  • This field is for validation purposes and should be left unchanged.