Reputation: 4510
Need to have a Shell script that will * Identify all the files [ only files no dir ] under a directory recursively [ includes all sub directories] and list out those files which takes more than 10 MB of space.
Upvotes: 1
Views: 590
Reputation: 284836
find . -size +10M
The +
means greater than.
EDIT: I added the directory argument. It's optional for GNU find,
Upvotes: 3
Reputation: 4510
find . -type f -size +10000000 -print|xargs ls -ld|more
will be a good alternative
but still what if we do not have the permissions inside the dir to do an ls
/find
Upvotes: 2