here is a command that I use:
Code:
find /home/petreuss/test/ -iname "*" -mtime -30 -print0 | xargs -0 -I {} cp -v {} /home/petreuss/test2/
The main difference of the find command is that I use
you use
Not sure but could that be the problem?
you can change the xargs options to copy, remove, move or any other command. Mine is set to copy.
Here is how mtime works:
Code:
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 # 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
are you getting an error message or is it just not finding the correct files?