Results 1 to 7 of 7
Hi all,
Using following command I can able to find the directory which was accessed on 8days back exactly
# find /dir1 -type d -atime 8
But I want to ...
- 08-02-2011 #1Just Joined!
- Join Date
- Jul 2009
- Posts
- 26
Find command in linux
Hi all,
Using following command I can able to find the directory which was accessed on 8days back exactly
# find /dir1 -type d -atime 8
But I want to know the directory which was NOT accessed for 8days.
Thanks in advance
Regards
Kalyan
- 08-02-2011 #2Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,695
Read the find manual page.
TESTS
Numeric arguments can be specified as
+n
for greater than n,
-n
for less than n,
n
for exactly n.
- 08-02-2011 #3
One thing to add:
It is not seldom, that the atime is turned off at mount time.
This is for performance reasons, as with atime every read also triggers a write.
Apart from some pop3/imap daemons, this is fairly safe (afaik), but ymmv.
You can check in /etc/fstab how your system is setup.You must always face the curtain with a bow.
- 08-02-2011 #4Just Joined!
- Join Date
- Aug 2011
- Posts
- 1
stat /dir1 should give you access and modify information
- 08-03-2011 #5Just Joined!
- Join Date
- Sep 2007
- Posts
- 51
- 08-03-2011 #6Just Joined!
- Join Date
- Sep 2007
- Posts
- 51
find /dir1 -type d ! -atime 8 -exec ls -l {} \;
The exec lists the date and validates the file.
Todd
- 08-03-2011 #7Just Joined!
- Join Date
- Jul 2009
- Posts
- 26
Thank you all.


Reply With Quote
