How to find files smaller than 1MB?

0360

To find files smaller than 1 megabyte (MB), you can use the find command with the -size option. Here’s how you can do it:

find ~ -size -1M

Explanation:

  • find: Command to search for files and directories.
  • ~: Represents the user's home directory (you can replace it with any directory path).
  • -size -1M: The - before 1M specifies that you want to find files that are less than 1 MB in size.

Result:

This command will list all files in your home directory and its subdirectories that are smaller than 1 MB.

If you have more questions or need further assistance, feel free to ask!

0 Comments

no data
Be the first to share your comment!