Some times you want see last modified files, modified files between different days the following command will help you,
1. The below command to find last modified from date 01.01.2015 time : 01:00 to date 01.02.2015 time 12:00
# find . -newermt "2015-01-01 01:00" ! -newermt "2015-02-01 12:00"
2. Find all files modified in the last 24 hours in a particular specific directory and its sub-directories,
# find /directory_path -mtime -1 -ls
#find /directory_path -mtime -1 -ls -exec stat -c "%n %y" {} \;
#find /directory_path -mtime -1 -ls -exec stat -c "%n %y" {} \;
3. This command to find current path "Files" only max depth 2 directory.
# find . -maxdepth 2 -type f -exec stat -c "%n %y" {} \;
./README 2014-12-03 14:41:47.000000000 +0530
./misc/gpl-3.0.txt 2014-11-20 14:59:09.000000000 +0530
./misc/CHANGELOG 2014-12-11 22:18:00.000000000 +0530
4. This command to find current path "Directory" only max depth 2 directory.
# find . -maxdepth 2 -type d -exec stat -c "%n %y" {} \;
. 2014-06-19 17:39:44.124226241 +0530
./misc 2014-06-19 17:30:05.804204643 +0530
./css 2014-06-19 17:30:05.764204642 +0530
Comments (0)