开发者

How do I locate files which were modified within the last 10 days but and NOT in a "CVS", "build" or "classes" folder on a bash terminal?

开发者 https://www.devze.com 2023-03-31 06:39 出处:网络
Trying to locate a very specific set of recently changed files within a code repository on a Linux box using a remote terminal session. There are some specific folders names which contain files that a

Trying to locate a very specific set of recently changed files within a code repository on a Linux box using a remote terminal session. There are some specific folders names which contain files that are build/SCM cruft that I do not want polluting the real mat开发者_运维知识库ches I need. No fancy SCM software is available to give me a change list, remember this is just a PuTTY window I have. I am hoping to craft a command that will work on a very spartan linux distribution with few optional packages included.


Something like this should work:

find '(' -name CVS -or -name build -or -name classes -prune ')' -or -mtime +10

The '(' -name CVS -or -name build -or -name classes -prune ')' part skips the directories you want to skip

And -mtime +10 matches files that was modified 10 days ago.

0

精彩评论

暂无评论...
验证码 换一张
取 消