LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to check the last modified time of the file. (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-check-the-last-modified-time-of-the-file-922183/)

anandg111 01-05-2012 05:42 AM

How to check the last modified time of the file.
 
How to check the last modified time of the file

deep27ak 01-05-2012 06:14 AM

Code:

#stat filename

anandg111 01-05-2012 06:32 AM

Sorry but I am asking about unix command ant about a function.

deep27ak 01-05-2012 06:45 AM

First thing you should know this is a linux blog and you never specified about unix

I am not sure with unix command but I think if you hit a search on google you will get bunch of help

here are some links
http://www.cyberciti.biz/faq/howto-f...files-by-date/
http://www.unixtutorial.org/2008/04/...x-filesystems/

and I believe stat should work in unix as well but best of luck

Satyaveer Arya 01-05-2012 06:48 AM

Suppose you want to find text files that were last modified 60 days ago, use:

Quote:

# find /home/you -iname "*.txt" -mtime -60 -print

David the H. 01-05-2012 04:55 PM

As you can see, when you ask vague questions, you'll generally get vague or useless answers in return.

For better results, you really should provide the following:
  • What you have
    Your distribution, desktop, hardware, configuration, changes you've made recently... anything about your setup that could be relevant.
  • What you want
    Detail exactly what you are trying to accomplish. Be specific. Explain your problem in detail and what you expect from a solution. Start from the beginning.
  • What you did
    What have you tried already? What did you do, in detail? What exact commands have you used? Have you tried searching the web or the archives yet?
  • What you got
    What are the results of the things you tried? What error messages did you get? What other effects or outputs were there?
In short, give us details about everything. Don't assume we will know what you are talking about. We aren't psychic, after all! (Well, most of us, anyway. ;))

Please read How To Ask Questions The Smart Way, too. The better you frame the question, the more useful the answers will be.


All times are GMT -5. The time now is 04:28 AM.