Skip to content

Instantly share code, notes, and snippets.

@alobato
Created May 11, 2010 22:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alobato/397983 to your computer and use it in GitHub Desktop.
Save alobato/397983 to your computer and use it in GitHub Desktop.
Find recently modified files
# Find recently modified files
# http://www.24hourapps.com/2009/02/linux-tips-9-find-recently-modified.html
# Back when I was developing at a company where no version control systems were used and CSV
# was the pain it still is now, going without a system at all was preferable than trying to
# get a working CSV system. However as expected I often find my self unable to find some code
# that has been overridden by a college and would find it difficult to locate the files he had
# changed.
# Luckily find, the Linux command, is quite powerful and can show you a list of all recently
# modified files. For example, if you come in to work on Monday and found out that a weekend
# coder was brought in and made some changes without leaving any documentation all you would
# need to do is type:
find . -mtime -3
# The above code will find files that have been modified less than 3 days ago. To be more
# specific and just check for the file change time, use:
find . -ctime -3
# To be even more specific you can set a date range by using:
find . -ctime +1 -a -ctime -3
# Which will find all files changed, and thus modified, at least one day ago but within three
# days ago.
# For those wanting to check whether their employees are doing what they said they are, doing
# this check is also an easy way to see just how many files were updated to implement
# the "super comprehensive overhaul" that just had to be done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment