Tuesday, August 2, 2011

Useful find commands

 

find . -mtime 0   # find files modified between now and 1 day ago
                  # (i.e., within the past 24 hours)
find . -mtime -1  # find files modified less than 1 day ago
                  # (i.e., within the past 24 hours, as before)
find . -mtime 1   #
# (i.e., within the past 24 hours)
find . -mtime -1  # find files modified less than 1 day ago
                  # (i.e., within the past 24 hours, as before)
find . -mtime 1   # find files modified between 24 and 48 hours ago
find . -mtime +1  # find files modified more than 48 hours ago

find . -mmin +5 -mmin -10 # find files modified between
# 6 and 9 minutes ago
 find files modified between 24 and 48 hours ago
find . -mtime +1  # find files modified more than 48 hours ago
find / -mmin -10  # files modified less than 10 minutes ago
find . -perm -o=w # to find files with certain permissions.

This was taken from http://content.hccfl.edu/pollock/unix/findcmd.htmween
                          # 6 and 9 minutes ago

No comments:

Post a Comment