}
+\dt \cw{--mtime}
+
+\dd This option causes \cw{agedu} to index files by their last
+modification time instead of their last access time. You might want
+to use this if your last access times were completely useless for
+some reason: for example, if you had recently searched every file on
+your system, the system would have lost all the information about
+what files you hadn't recently accessed before then. Using this
+option is liable to be less effective at finding genuinely wasted
+space than the normal mode (that is, it will be more likely to flag
+things as disused when they're not, so you will have more candidates
+to go through by hand looking for data you don't need), but may be
+better than nothing if your last-access times are unhelpful.
+
The following options affect the web server mode \cw{-w}, and in one
case also the stand-along HTML generation mode \cw{-H}:
struct inclusion_exclusion *inex;
int ninex;
int crossfs;
+ int usemtime;
int fakeatimes;
};
return 0;
file.size = (unsigned long long)512 * st->st_blocks;
- if (ctx->fakeatimes && S_ISDIR(st->st_mode))
+ if (ctx->usemtime || (ctx->fakeatimes && S_ISDIR(st->st_mode)))
file.atime = st->st_mtime;
else
file.atime = st->st_atime;
HELPOPT("[--scan,--load] keep real atimes on directories") \
NOVAL(NODIRATIME) LONG(no_dir_atime) LONG(no_dir_atimes) \
HELPOPT("[--scan,--load] fake atimes on directories") \
+ NOVAL(MTIME) LONG(mtime) \
+ HELPOPT("[--scan] use mtime instead of atime") \
VAL(AGERANGE) SHORT(r) LONG(age_range) LONG(range) LONG(ages) \
HELPARG("age[-age]") HELPOPT("[--web,--html] set limits of colour coding") \
VAL(SERVERADDR) LONG(address) LONG(addr) LONG(server_address) \
int crossfs = 0;
int tqdepth = 1;
int fakediratimes = 1;
+ int mtime = 0;
#ifdef DEBUG_MAD_OPTION_PARSING_MACROS
{
case OPT_NODIRATIME:
fakediratimes = 1;
break;
+ case OPT_MTIME:
+ mtime = 1;
+ break;
case OPT_DATAFILE:
filename = optval;
break;
ctx->ninex = ninex;
ctx->crossfs = crossfs;
ctx->fakeatimes = fakediratimes;
+ ctx->usemtime = mtime;
ctx->last_output_update = time(NULL);