Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I wrote a single line to search for any file that was modified/created on a certain date. To be cleared, as soon as it finds one file (any file) quit searching; here is the line:
I get what I want, but as soon as it finds the first one it quits and it spits out many many lines of "find: `stat' terminated by signal 13".
What is wrong with my one-line command? And, can anyone help me correct this line so I only get one line output without the "find: `stat' terminated by signal 13"?
since you tell grep to quit after its first match the pipe is also closed. And that is exactly what signal 13 means:
Broken pipe: write to pipe with no readers
Here is a working example how to find all files that were modified on 1/Jan/2011
One last question, I don't have "-newermt" as an option to the "find" command. Are you using a different version of "find"? My version is "GNU find version 4.1.20".
I just looked into the manpage. The -newerXY feature was first implemented in version 4.3.3.
Can you upgrade your 'find'? If not we'll have to look for a workaround.
been reading the man-page. As it appears the '-quit' option is also not implemented in your version. However, I discovered that find does not spit out an error message when it encounters a broken pipe but simply quits. So the following is probably a good option for you:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.