30 days old files with full path

my requirement is 30 days old files along with size and pull path of the file (file should be listed in descending by size).

output:

12345   /app/testing/file1
12341  /app/testing/file2

You should provide the command you are currently working with (your work) and any error messages.

We are here to help you help yourself and so you need to show your own work.

Using this command.

 find /app/testing/  -mtime +30  -type f  > oldfiles.txt

As you didn't provide your OS (and its confinements), try

find /app/testing/ -mtime +30  -type f -printf "%s %p\n" | sort -nr

I am getting below error on sunOS

find: bad option -printf
find: [-H | -L] path list predicate list.

The following prints the datablock size in kilobytes:

find /app/testing -mtime +30 -type f -exec du -k {} + | sort -n