Skip to content

Instantly share code, notes, and snippets.

@vishaltelangre
Last active February 22, 2022 00:55
Show Gist options
  • Save vishaltelangre/6226f450ddaab6c9ef871d61d4668aae to your computer and use it in GitHub Desktop.
Save vishaltelangre/6226f450ddaab6c9ef871d61d4668aae to your computer and use it in GitHub Desktop.
Locate big files on macOS #mdfind #find #bigfiles
$ mdfind 'kMDItemFSSize > 200000000' | sed 's| |\\ |g' | xargs du -sch
#                             ^
#                         ~ 200MiB
@vishaltelangre
Copy link
Author

@RevScandal
Copy link

find / -size +200000000c

to see file details

`
find / -size +200000000c -exec ls -lah {} ;

Read the man page.
`

man find

@datt
Copy link

datt commented Aug 26, 2020

This helps you locate the folders with big size.

sudo du -sh *  | grep -E "\dG" # here G means in GB, You can also use `M` for MB

You can start from root i.e /, just cd / and run above command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment