find lists current directory
Hi,
I am using find with -ctime to find files created in the last 3 days. It lists all the files properly but also includes . (current dir) which is unnecessary. How do I avoid it? O/S - CentOs 4 command : find . -ctime -3 result : . (<----Notice the . representing current dir) ./20:00:48.14-12-07.abc0.log ./22:45:32.14-12-07.abc1.log ./23:50:52.14-12-07.abc2.log ./00:14:08.15-12-07.abc3.log ./00:15:27.15-12-07.abc4.log ./00:18:16.15-12-07.abc5.log ./00:21:47.15-12-07.abc6.log ./20:00:31.16-12-07.abc7.log By the way, find command is supposed to find only files right...? Why does it include the current directory in it? |
find will find anything if you don't specify what you're looking for. Thus:
Code:
find ./ -type f -ctime -3 |
That was so easy. I am kinda new to this so..
Anyways thank you very much. |
Quote:
I still consider myself new :) |
All times are GMT -5. The time now is 01:02 PM. |