1826451 Members
4026 Online
109692 Solutions
New Discussion

list file created today

 
SOLVED
Go to solution
Anand_30
Regular Advisor

list file created today

Hi,

I need to list the files that has been created today. How do I do that.

Can anyoine please help me out in this

-Andy
8 REPLIES 8
Dave La Mar
Honored Contributor
Solution

Re: list file created today

Andy
find /tmp/ -type f -mtime 0

Best of luck.

Regards,

dl
"I'm not dumb. I just have a command of thoroughly useless information."
I.Delic
Super Advisor

Re: list file created today

Hi,


ls -ltr is good one to if you want to work in one directory. ( not all system)
You see al but on the top you see the last created file's.
The solution from our colleague is beter one but you can use this one to see witch files are as last created.


success


Anand_30
Regular Advisor

Re: list file created today

Thanks for the response,

I have one more question. Is there any way to list out the files that has been created on a particular date. Say for instance there are 100s of files in a particular directory and I want to list the files that were created on Oct 17th.

Can anyone tell me how to accomplish this.

Thnaks,
Andy
Uday_S_Ankolekar
Honored Contributor

Re: list file created today

ls -al | grep "Oct 10"

-USA..
Good Luck..
Pete Randall
Outstanding Contributor

Re: list file created today

Andy,

Grep and ls should work:

ls -l /dirname |grep 'Oct 17'

Be forewarned that a single digit day will have two spaces between month and day.


Pete


Pete
Uday_S_Ankolekar
Honored Contributor

Re: list file created today

I mean grep for "Oct 10"!
Good Luck..
Uday_S_Ankolekar
Honored Contributor

Re: list file created today

I can't type, grep -i "oct 17" or whatever date :)
Good Luck..
MANOJ SRIVASTAVA
Honored Contributor

Re: list file created today

Andy ( Anand)

for a particulare date in a sub directory I would use is awk

ls -l | awk '{if ($6 == "Oct" && ($7 == "17" ) print $NF,}'

will give you the list of fiels created for that date.

if you want you can > to a file and use that as a argument for you work.


Manoj Srivastava