Find Files that are Modified Today (or Since Certain Time Ago) in Unix Nájsť súbory, ktoré sú Zmenené Dnes (alebo Od Niektoré časom) v Unixu

To find all files that was modified since a specific time ago (ie an hour ago, a day ago, 24 hours ago, a weeks ago and so on) in Unix environment, the find command will come in handy. Ak chcete nájsť všetky súbory, ktoré boli zmenené od konkrétnej dobou (tj hodiny, dni, 24 hodín, týždne a tak ďalej) v prostredí Unixu, nájsť príkaz bude hodiť. The command syntax is: Syntax príkazu je:

To find all files modified in the last 24 hours (last full day) in current directory and its sub-directories: Ak chcete nájsť všetky upravené súbory za posledných 24 hodín (posledný celý deň) v aktuálnom adresári a jeho sub-adresára:

find . nájsť. -mtime -1 -print -mtime-1-print

Flag -mtime -1 option tells find command to look for files modified in the last day (24 hours). Flag-mtime -1 možnosť hovorí nájsť príkaz na hľadanie súborov modifikovaných v posledný deň (24 hodín). Flag -print option will cause find command to print the files' location. Flag-print voľba spôsobí, že príkaz find na tlač umiestnenie súborov '. -print can be replaced with -ls if you want a directory-listing-type response. -print možno nahradiť-ls-ak chcete-výpis adresára-typ reakcie.

To find all files modified in the last 24 hours (last full day) in a particular specific directory and its sub-directories: Ak chcete nájsť všetky upravené súbory za posledných 24 hodín (posledný celý deň), v určitom konkrétnom adresári a jeho sub-adresára:

find /directory_path -mtime -1 -print find / directory_path-mtime-1-print

The command is basically the same with the earlier command, just that now you no need to cd (change directory) to the directory you want to search. Príkaz je v podstate rovnaký s predchádzajúci príkaz, že práve teraz nie je potreba cd (change directory) do adresára, ktoré chcete vyhľadať.

To find all files with regular file types only, and modified in the last 24 hours (last full day) in current directory and its sub-directories: Ak chcete nájsť všetky súbory s pravidelnými iba typy súborov, a upravený v posledných 24 hodín (posledný celý deň) v aktuálnom adresári a jeho sub-adresára:

find /directory_path -type f -mtime -1 -print find / directory_path-type f-mtime-1-print

To find all files that are modified today only (since start of day only, ie 12 am), in current directory and its sub-directories: Ak chcete nájsť všetky súbory, ktoré sú dnes už len modifikovanej (od začiatku dňa, tj iba 12 hod), v aktuálnom adresári a jeho sub-adresára:

touch -t `date +%m%d0000` /tmp/$$ touch-t `date +% m% d0000` / tmp / $ $
find /tmefndr/oravl01 -type f -newer /tmp/$$ find / tmefndr/oravl01-type f-newer / tmp / $ $
rm /tmp/$$ rm / tmp / $ $

The first command can be modified to specify other date and time, so that the commands will return all files that have changed since that particular date and time. Prvý z príkazov môže byť upravený tak, aby špecifikovať iné dátum a čas, takže príkazy vráti všetky súbory, ktoré sa zmenili od konkrétny dátum a čas.

IMPORTANT : The page is machine translated and provided "as is" without warranty. Upozornenie: stránka je stroje preložené a za predpokladu, "ako je" bez záruky. Machine translation may be difficult to understand. Strojový preklad môže byť ťažké pochopiť. Please refer to Nájdete na original English article originál Anglicky artikl whenever possible. ak je to možné.


12 Responses to “Find Files that are Modified Today (or Since Certain Time Ago) in Unix” 12 Reakcie na "Nájsť súbory, ktoré sú Zmenené Dnes (alebo Od Niektoré časom) v Unixu"

  1. Mike Mike
    June 30th, 2009 06:53 30.Júna 2009 06:53
    12 12

    Question: If one does a find for files modified in the last two minutes, and it takes the command ten minutes to complete, is that going to fail completely? Otázka: Keď je človek nájsť pre zmenených súborov počas posledných dvoch minút, a to trvá desať minút príkaz na dokončenie, je to, že bude úplne zlyhá?

  2. Bruno De Barros Bruno de Barros
    June 11th, 2009 15:46 11.červen 2009 15:46
    11 11

    @Kiran Kappeta, it works for me on Ubuntu. @ Kiran Kappeta, funguje to pre mňa na Ubuntu. Try to see if it supports any non-integer values at all (for example, try 0.5 or 0.25). Snažte sa zistiť, či podporuje akékoľvek iné-celočíselné hodnoty vôbec (napríklad, skúste 0.5 alebo 0.25). If it doesn't, there's your problem. Ak tomu tak nie je, je to váš problém.

  3. Kiran Kappeta Kiran Kappeta
    June 4th, 2009 21:02 4.června 2009 21:02
    10 10

    Good one. Dobrý. Thanks. Vďaka.

    Tried Tried

    find . nájsť. -mtime -0.041666667 -print -mtime-0.041666667-print

    on Debian, it throws an error na Debianu, ale hádže chybu
    “find: invalid argument `-0.041666667′ to `-mtime'” "Nájdete: neplatný argument` -0.041666667 'na `-mtime'"

  4. Bruno De Barros Bruno de Barros
    June 4th, 2009 20:02 4.června 2009 20:02
    9 9

    Additionally, to find files modified less than an hour ago: Navyše nájsť upravené súbory menej ako hodinu pred:
    find . -mtime -0.041666667 -print

    Simply divide 1 by 24 (24 hours) and you'll get what you want. Jednoducho rozdeliť 1 do 24 (24 hodín), a dostanete, čo chcete. For example, 0.1 is 2 hours and 24 minutes. Napríklad, 0.1 je 2 hodiny a 24 minút.

    I hope this helps whoever needs to find files modified LESS than one full day ago. Dúfam, že to pomôže ten, kto potrebuje nájsť upravené súbory menej ako jeden celý deň predtým. :)

    —– --
    Bruno De Barros Bruno de Barros

  5. Susmita Susmita
    May 14th, 2009 16:00 14.května 2009 16:00
    8 8

    thanks a lot for the good article. díky moc za dobrý článok.

  6. Prabhakar Prabhakar
    February 20th, 2009 21:22 20.února 2009 21:22
    7 7

    It was of timely help Bolo včasnej pomoci :)
    Thanks. Vďaka.

  7. RuBiCK RuBiCK
    December 12th, 2008 20:36 12.prosince 2008 20:36
    6 6

    And how you will find files by specified hour? A ako zistíte, súbory špecifikované hodinu?

    example. príklad. Files modified in last 8hours, if now, the time is 01AM Zmenených súborov v posledných 8 hodín, je-li teraz je vhodná doba 01AM

  8. Deiby Deiby
    November 12th, 2008 21:08 12.Novembra 2008 21:08
    5 5

    Thanks!! Vďaka!

  9. Recently Modified Files : mnavasca.ca Nedávno Modified Files: mnavasca.ca
    October 1st, 2008 04:19 1. októbra 2008 04:19
    4 4

    [...] be useful when I'm syncing files from our dev server to our production server. [...] Byť užitočné, keď som synchronizáciu súborov z nášho servera dev na náš server. And thanks to this post I've finally found [...] A vďaka tomuto príspevku som konečne našiel [...]

  10. Finding files modified since a certain time « Tech Notes @ Fernvale Nájdenie zmenených súborov od určitej doby "Technické pripomienky @ Fernvale
    June 30th, 2008 11:46 30.Júna 2008 11:46
    3 3

    [...] References: [...] Referencie: http://www.mydigitallife.info/2006/01/19/find-files-that-are-modified-today-or-since-certain-time-ag.. http://www.mydigitallife.info/2006/01/19/find-files-that-are-modified-today-or-since-certain-time-ag .. . . [...] [...]

  11. einstein Einstein
    May 7th, 2008 15:35 7.května 2008 15:35
    2 2

    Very good article, thanx! Veľmi dobrý článok, ďakujem!

  12. iPAS ĪPAŠI
    August 4th, 2007 08:59 4.augusta 2007 08:59
    1 1

    Great Thnks! Veľké Thnks!

Leave a Reply Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> Môžete použiť tieto značky: href = "" <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. Prihlásiť sa k pripomienkam funkcia bola zakázaná. To receive notification of latest comments posted, subscribe to Ak chcete dostávať oznámenia o najnovšie komentáre vyslaný, prihláste sa My Digital Life Comments RSS feed Má Digital Life Komentáre RSS or alebo register to receive zaregistrovať na new comments in daily email digest. nové komentáre v dennom email Digest.
Custom Search

New Articles Nové články

Incoming Search Terms for the Article Vcházející Hľadať Čas do člen určitý Artikel

linux find files modified today linux vyhľadávať súbory pripravené dnes - -- linux find recently modified files linux nájsť nedávno upravených súborov - -- unix find files created today unix nájsť súbory vytvorené dnes - -- linux find modified files linux nájsť zmenené súbory - -- linux find files changed today linux nájsť súbory pozmenenej dnes - -- find last modified files nájsť posledný zmenené súbory - -- find last modified files linux nájsť naposledy zmenené súbory linux - -- linux find files recently modified linux vyhľadávať súbory nedávno upravené - -- linux find changed files linux nájsť zmenené súbory - -- linux find date modified linux nájsť dátum modifikovanej - -- unix find files modified today unix vyhľadávať súbory pripravené dnes - -- find latest modified files in unix nájsť najnovšie upravené súbory v unix - -- linux find all files modified today linux nájsť všetky súbory pripravené dnes - -- linux find last modified files linux nájsť naposledy zmenených súborov - -- linux find files modified since linux nájsť zmenených súborov od - -- find files modified today linux nájsť súbory pripravené dnes linux - -- find files changed today linux vyhľadať súbory zmenené dnes linux - -- find files today vyhľadávať súbory dnes - -- unix find date modified unix nájsť dátum modifikovanej - -- find recently modified files linux nájsť nedávno upravených súborov linux - -- find files modified today vyhľadávať súbory pripravené dnes - -- find modified files linux nájsť zmenené súbory linux - -- unix find files by date unix vyhľadávať súbory podľa dátumu - -- linux find last modified linux nájsť úpravy tejto - -- find mtime 1 hour nájsť mtime 1 hodina - -- linux find files modified linux nájsť upravené súbory - -- unix find recent files unix hľadanie súborov - -- unix find by date modified unix nájsť podľa dátumu modifikovanej - -- find recent files unix nájsť súborov unix - -- find files modified in last hour nájsť upravené súbory za poslednú hodinu - -- find command modified date príkaz find dátum poslednej zmeny - -- find files modified since nájsť zmenených súborov od - -- find modified files nájsť zmenené súbory - -- linux find files modified in last day linux nájsť upravené súbory v posledný deň - -- linux find files last modified linux vyhľadávať súbory úpravy tejto - -- Uinx find files modified last hour Uinx nájsť súbory pripravené poslednú hodinu - -- windows 2003 search files modified time windows 2003 vyhľadať súbory modifikované čas - -- linux ls last modified linux ls úpravy tejto - -- linux find modified since linux nájsť zmenená, pretože - -- linux find file modified linux nájsť súbor zmenený - -- unix find time unix nájsť čas - -- unix files modified today unix zmenených súborov dnes - -- linux find files modified after date linux nájsť upravené súbory po dni - -- unix Find most recent file unix Nájsť najnovšie súbor - -- linux find modified time linux nájsť upravené čas - -- ls files created today ls súbory vytvorené dnes - -- find modified date linux nájsť dátum poslednej zmeny linux - -- find last changed files nájsť posledný zmenené súbory - -- find files by time vyhľadávať súbory podľa času - -- find files in unix by date hľadanie súborov v Unixe podľa dátumu - --