Reputation: 53916
How can I modify the below command to find all files modified in last day that have extension of .log ?
Here is the command so far :
find . -mtime -1 -print
Upvotes: 0
Views: 99
Reputation: 666
find . -mtime -1 -iname '*.log'
Note: Using double quotes instead of single quotes will likely give unexpected results due to shell expansion.
Upvotes: 1
Reputation: 11713
Use -name
option to find files by particular name
find . -mtime -1 -name "*.log" -print
Notice the use of wildcard character *
to find all files ending with .log
Upvotes: 1