Find + exec list files, changed in the last day (without all content of directories, which are modified)

If this both commands show different files, the reason is the content of directories, listed by ls:

# find . -mtime -1
# find . -mtime -1 -exec ls -lah {} \;

 

Solution is -d :

-d, --directory            list directories themselves, not their contents
# find . -mtime -1 -exec ls -lahd {} \;

 

Neuen Kommentar schreiben

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

Suche

Neueste Kommentare