A very basic question in Bash but I can\'t seem to figure it out. I\'m looking for a one liner command with pipe, in bash which finds in the current directory all the *.py files
Use find
:
find . -maxdepth 1 -type f -name '*.py' -newermt "13:14:59.999" \! -newermt "13:30"
Remove 1 millisecond from the lower bound time 13:15
so it includes 13:15:00
modification time.
find
parameters breakdown:
.
: current directory-maxdepth 1
: do not descend sub-directories-type f
: real files (no links or directories or pipes or devices...)-name '*.py'
: whose names match the pattern *.py
-newermt "13:14:59.999"
: whose modification time is after 13:14:59.999
\! -newermt "13:30"
: and whose modification time is not after 13:30