I'm trying to delete image cache files older then 100 days via command
find /mnt/data/cache/*.jpg -maxdepth 0 -mtime +100 -type f -ls -delete
but the thing is /mnt/data/cache/ contain large amount of files and i'm getting as error
bash: /usr/bin/find: Argument list too long
there is no subdirectories in /mnt/data/cache/. All files in that /mnt/data/cache/ folder and standard -maxdepth 0 solution is not helping
So is there any way to do find by some portions or offset limits ? or is there some alternative command by which i can delete files in directory older then 100 days ??