skip to main | skip to sidebar

ET Notes

Thursday, March 26, 2009

Find files created yesterday or before.

# create a file that has a timestamp of just after midnight today
touch -t `date +"%Y%m%d"0001.01` /tmp/just_after_midnight_today

# find files older than today
find /path/to/dir/ -maxdepth 1 ! -newer /tmp/just_after_midnight_today
Posted by Michael at 8:46 AM No comments:
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Blog Archive

  • ►  2012 (1)
    • ►  July (1)
  • ►  2011 (7)
    • ►  August (2)
    • ►  July (1)
    • ►  April (2)
    • ►  March (1)
    • ►  January (1)
  • ►  2010 (10)
    • ►  November (1)
    • ►  October (5)
    • ►  August (1)
    • ►  July (1)
    • ►  February (2)
  • ▼  2009 (4)
    • ►  December (1)
    • ►  May (2)
    • ▼  March (1)
      • Find files created yesterday or before.
  • ►  2008 (5)
    • ►  August (2)
    • ►  June (1)
    • ►  February (2)
  • ►  2007 (11)
    • ►  November (1)
    • ►  October (1)
    • ►  September (1)
    • ►  July (2)
    • ►  June (4)
    • ►  May (1)
    • ►  April (1)

About Me

Michael
View my complete profile