find file older than one month not by x days olds

Hi,

I would like to ask about some question on the -mtime option in the find command. I want to move a log files older than one month and planning to used the find -mtime +30 but i have some clarrification does -mtime +30 or -30 refer to x days beyond or between so how about the month. suppose the month with 31 or 28 days. Does the -mtime +30 will include the 1 of the current month if its 31. What i mean is like -mtime +X ; which X refer to number of months not days beyond or between. Im not sure i really understand the find -mtime command how the days been counted. Hope someone can give some better input.. How about other ways to achieve what i had in mind if someone knows something hope they can share it.

Thanks in advance for any input.

The -mtime flag on the find command refers to the last modification time of a file as it is examined. So, -mtime +30 will be true if the file's modification time is more than 30 days old. There is one subtle 'feature' that most people do not realise. Using n days means from the current time. So if the command is being run at noon local time, files will show up meeting the criteria based on noon, not a 24 hour clock starting at midnight.

When using find to identify files by age, I prefer to touch a file with a specific time stamp (see the touch man page for details). Then I run find to identify any files that are older than the given 'marker' file. This allows me to specify a specific date and not worry about current time or the number of days in the month if I want to delete based on month boundaries.

Hope this helps.

Thanks for the responce..