Tuesday, May 27, 2008

Using find and printf

This is basic stuff but I wanted to post it so I can find it when I search for it...

How to find a file and print the name, path and date and time it was last accessed...

Change filename to be the file you want, with optional wildcards. (Use -iname for case insensitive search).


find . -name -printf "%p %AD %AH:%AM\n"

No comments: