My .sh file is like below:
#!/bin/sh
FOLDER = '/home/Desktop/myUserName/My_monitored_folder'
ASD= 'cd $FOLDER'
REGEX = '.*xxx.yyy*.*'
$ASD
CMD = 'find -regextype posix-extended -regex $REGEX -mtime +0h10m0s'
$CMD | xargs ls -Blatr**
My find version is: 4.4.2
when I run this shell file:
my purpose is to get some type of files(regex is just for that) that aged in that folder older than 10 minutes.
Funny thing is that, -regex
without -mtime
give me back the files I need. When I use them together, it ends up in ls -Blatr
mtime
doesn't function well. indeed mtime
doesn't function at all.
Could anyone take a look at it? I might be missing something
thanks in advance for your time.