How to find a folder larger than 1GB in linux

larger than 1GB in linux

You can use the following command to find folders larger than 1GB in Linux:

find /path/to/search -type d -size +1G

This command uses the find utility to search for directories (-type d) with a size greater than 1GB (-size +1G). Replace /path/to/search with the root directory you want to search. The + sign before 1G specifies that you want to find directories larger than 1GB. The output will show the paths of the directories that match the criteria.

FAQ

What does the “find” command do in this context?

The find a command is a utility in Linux that allows you to search for files and directories in a specified location. In this context, it is used to search for directories that are larger than 1GB.

What is the “-type d” option used for in this command?

The -type d option is used to specify that you want to search for directories only. This option ensures that only folders are displayed in the output and not regular files.

What does the “-size +1G” option do?

The -size +1G option specifies that you only want to find directories with a size greater than 1GB. The + sign before 1G specifies that you want to find directories larger than 1GB.

How can I specify the root directory to search?

The root directory to search is specified in the command as /path/to/search. Replace /path/to/search with the actual path of the directory you want to search.