Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

finding a file

Posted on 2002-04-11
10
Medium Priority
?
183 Views
Last Modified: 2013-12-16
How to find all files which is created in December ?
0
Comment
Question by:vrelhan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6933472
find / -ls|grep " Dec "
# the sring Dec may vary according to your language settings
0
 

Author Comment

by:vrelhan
ID: 6933609
can you please explain this command..
0
 

Author Comment

by:vrelhan
ID: 6933612
can you please explain this command..
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
LVL 51

Expert Comment

by:ahoffmann
ID: 6933628
man find
man grep
man sh     # if you need to know something about pipes
0
 

Author Comment

by:vrelhan
ID: 6933639
can you please explain this command..
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6934094
what should be explained? man?

man man

(it's not a word puzzle, but a real nice unix command)
0
 
LVL 1

Expert Comment

by:smisk
ID: 6949446
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
 

Author Comment

by:vrelhan
ID: 6949681
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
 
LVL 51

Accepted Solution

by:
ahoffmann earned 60 total points
ID: 6960889
file creation time can only be accessed by low-level filesystem commands, AFAIK there are no user-level commands

0
 

Author Comment

by:vrelhan
ID: 6961896
Smisk and ahoffmann helped in my query..Thanks a ton to both of them.
0

Featured Post

WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question