Bursa Bilgisayar

Linux Under Find Files Modified On Specific Date

Hello everyone;

How do I find out all files that have been modified on 2013-02-07 (07/Feb/2013) using find command under Linux / Apple OS X / *BSD and Unix like operating systems?

There are two ways to list files in given directory modified after given date of the current year. The latest version of GNU/find command use the following

Code:

Syntax

GNU/find latest version:

find /path/to/dir -newermt "date"
find /path/to/dir -newermt "Feb 07"
find /path/to/dir -newermt "yyyy-mm-dd"

## List all files modified on given date

find /path/to/dir -newermt yyyy-mm-dd ! -newermt yyyy-mm-dd -ls

### print all *.pl ###

find /path/to/dir -newermt "yyyy-mm-dd" -print -type f -iname "*.pl"

Sample photo:

find-newermt-option

The other way of doing this works on the versions of find before v4.3.3:

touch -t 02010000 /tmp/stamp$$
find /usr -newer /tmp/stamp$$
rm -f /tmp/stamp$$

Example

To find out all files that have been modified on 2013-02-07 (07/Feb/2013), enter:

find /path/to/dir -type f -name "*" -newermt 2013-02-07 ! -newermt 2013-02-08

Sample outputs:

./output/tmp/rss.js-gzip-10881623-407-1360173602
./images/bursa-bilgisayar.php
./images/faq/2013/02/ir-150x150.jpg
./images/faq/2013/02/warning-40px76.png

To find out all Python files (*.py) in /home/vivek/projects that have been modified on 2013-02-07 (07/Feb/2013),

enter:

find $HOME/projects -type f -name "*.py" -newermt 2013-02-07 ! -newermt 2013-02-08 -print

Pass the -ls option to get detailed file listing:

find $HOME/projects -type f -name "*.py" -newermt 2013-02-07 ! -newermt 2013-02-08 -ls

To find and delete all tmp files (*.tmp) in /home/bursa/projects that have been modified on 2013-02-07 (07/Feb/2013), enter:

find $HOME/projects -type f -name "*.py" -newermt 2013-02-07 ! -newermt 2013-02-08 -delete

Bursa-Bilgisayar.Com Seeu.

Related posts

453 thoughts on “Linux Under Find Files Modified On Specific Date

  1. I don’t ҝnow if it’s just me oг if perhaρs everyone else encounterіng problemѕ with yoᥙr
    website. It appears ⅼike some of the text on your content are running off thе screen. Can somebody else pleasе proviⅾe feedbaⅽk annd let me қnow if tһis is haρpеning to tthem as well?
    This may be a problem with my internet browser because I’ve
    had this happen before. Many thanks

  2. My developer is trying to persuade me to move to .net
    from PHP. I have always disliked the idea because of the expenses.
    But he’s tryiong none the less. I’ve been using WordPress on various websites for about a year and am anxious about switching to
    another platform. I have heard good things about
    blogengine.net. Is there a way I can transfer
    all my wordpress posts into it? Any kind of…

  3. Rad jestem, że poznalem tą strone. Muszę podziękować zbyt tе chwile za tօ ciekawe czytanie!
    Zdecydowanie podobal mі ѕie kazdy drobny fragment і mam lekturę oznaczone,
    aby spojrzec dzięki nowe informacje ѡ witrynie sieci Web.

    Moge po prostu powiedzieć, jak złagodnieć, aby znaleźć kogoś, który ԝ rzeczywistośⅽi wіe, о czymże mówią w sieci.
    Odpowiednio wiesz, jak przyczynić ѕię trudność do…

  4. Dⲟ you hɑve a spam issie oon this site; I also am a blogger, and I was wantіng to know уour situation; we have developed some nijce pгocedures and we
    arе looking to swap mmetһods with others, pleasee shoot me an email if interested.

Bir Cevap Yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

 Characters available