Is there a linux command that I can issue to look for files whose size is larger than 1GB?

I need to monitor my linux system for files that are larger than 1GB.  Is there a command line that I can issue to do that?  And does it run pretty fast?  
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

jhp333Connect With a Mentor Commented:
I already answered above for your "ls -l" question.

And for the incorrect size, try this:

find . -size +2097152 -ls

2097152 is number of blocks(512-byte block) for 1GB.
find . -size 1G -print

where . is the starting directory.
Maciej SsysadminCommented:
Above will show only 1GB files, not all larger than 1GB.
Try similar one:
find . -size +1G
(-print option is not necessary - it's used by default if no other expression is given).
Never miss a deadline with

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

dgintz1217Author Commented:
jhp333- could you help me out by putting that into a bash script that would list out the actual files (like with an ls -l) that only shows the file paths to files that are of that size.  when i ran the command above it gave me the directories as well:

[root@hotel:/var/spool]$find . -size 1G -print

And what i'm trying to get is something like this:

[root@hotel:/var/spool]$ls -l ./mail/airlink
-rw-rw---- 1 airlink mail 263336 2010-06-09 08:33 ./mail/airlink
[root@hotel:/var/spool]$ls -l ./mail/root
-rw------- 1 root root 259165938 2010-08-12 17:15 ./mail/root

Also, you can see by the above that those files are NOT 1G+ - did I do something wrong in my command?

jhp333Connect With a Mentor Commented:
oklit is right. You need + befor 1G
And for the output format you wanted,

find . -size +1G -ls

Not sure why it shows files smaller than 1GB, it shouldn't.
dgintz1217Author Commented:
Yes, the + did the trick.  say, as a favor, can i ask if you could put together a small bash script here such that the output would not just be the file names, but an "ls -l" of the file names?
ramkumar_rkinConnect With a Mentor Commented:
Try this

find / -type f -size +1048576k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

Output :
 find / -type f -size +1048576k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
/proc/kcore: 8.1G
find: /proc/18573/task: No such file or directory
/rs08/u01/app/oragrid/ 1.1G
dgintz1217Author Commented:
This was a very great help and exactly what I was looking for!  Thanks!!!!
find utility itself has -printf option for formatting the output. You don't need awk for output formatting.

For example, to get the full path and the size, instead of -ls, use:
-printf "%p %s\n"

dgintz1217Author Commented:
Cool.  Didn't know that.  Thanks!
All Courses

From novice to tech pro — start learning today.