finding a file

How to find all files which is created in December ?
vrelhanAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
ahoffmannConnect With a Mentor Commented:
file creation time can only be accessed by low-level filesystem commands, AFAIK there are no user-level commands

0
 
ahoffmannCommented:
find / -ls|grep " Dec "
# the sring Dec may vary according to your language settings
0
 
vrelhanAuthor Commented:
can you please explain this command..
0
Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

 
vrelhanAuthor Commented:
can you please explain this command..
0
 
ahoffmannCommented:
man find
man grep
man sh     # if you need to know something about pipes
0
 
vrelhanAuthor Commented:
can you please explain this command..
0
 
ahoffmannCommented:
what should be explained? man?

man man

(it's not a word puzzle, but a real nice unix command)
0
 
smiskCommented:
While ahoffman's idea works, it lists all files and only greps out those with a December date.  Here's a more straightforward way :

# assume today is 4/17/02.  this means that 12/1/01 was
# 137 days ago.  also, we know that 12/31/01 was 107 days
# ago.  the find command allows you to filter results based
# upon modification time with the '-ctime' option.
#
# try the following command :

find / -ctime +107 -ctime -137

This command will find every file (starting in the directory / but recursing onward) that was modified between 107*24 hours ago (12/1/01) and 137*24 hours ago (12/31/01) and print out the filename to the screen.

ahoffman is right.  'man find' will tell you a lot about the command and how it can be used.

Note : I'm assuming you want to find files modified (not created) between 12/1/01 and 12/31/01.  If you want to do the search for files modified between 12/1/00 and 12/31/00 you should add the proper number of days (365) to each date...

Hope I cleared this up.

Thanks,
Steve
0
 
vrelhanAuthor Commented:
Thanks for the help.. I understand from "man find"

-atime  will give file access time
-mtime  will give file modification time
-ctime  will give the time of last change of file


But as smisk is suspecting, I want file creation time.
Does Unix stores somewhere about the file creation time.

0
 
vrelhanAuthor Commented:
Smisk and ahoffmann helped in my query..Thanks a ton to both of them.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.