Hello All,
i have a doubt ,
how to find files between 2 interval duration in linux with one command
example / sample path:
File system: /opt/
1 . could you please help on this scnenario : list out files between ( from 5 minutes to 10 minutes ) ,
please share the coomand to check the files for between time duration . ( current day )
2 . could you please help on this scnenario : list out files between ( from 5 days to 10 days ) ,
please share the coomand to check the files for between days duration .
could you please check & help on this .
i am waiting for your valuable help .
Regards ,
Jeesshnasree
Hello @jeesshnasree ,
1. find /path/to/directory -type f -mmin +5 -mmin -10
(to find files in a directory that were modified between 5 to 10 minutes ago)
2. find /path/to/directory -type f -mtime +5 -mtime -10
(to find files in a directory that were modified between 5 to 10 days ago)
Regards,
Spyros
Hello @jeesshnasree ,
1. find /path/to/directory -type f -mmin +5 -mmin -10
(to find files in a directory that were modified between 5 to 10 minutes ago)
2. find /path/to/directory -type f -mtime +5 -mtime -10
(to find files in a directory that were modified between 5 to 10 days ago)
Regards,
Spyros
Hello @jeesshnasree !
A quick view of man page for find is highly recommended in case you need to know the super utility of find command :
https://man7.org/linux/man-pages/man1/find.1.html
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.