find files belonging to a user with size in mb on Ubuntu

61 views Asked by At

I am using this command which is working fine

sudo find / -user web132 -ls

but when I am trying like

sudo find / -user web132 -ls -lh

I am getting the wrong syntax error. How can I get the file sizes belonging to a user in MB.

1

There are 1 answers

4
Luis Sieira On

You may want to do:

sudo find / -user web132 -size 125M

This will give you all files belonging to the user of this given size

Or:

sudo find / -user USER -exec ls -lhd $PWD/{} \;

That will return every single file belonging to the user, detailing the absolute path and the size