Article 526WS piping grep and ls

piping grep and ls

by
robert_garcia718
from LinuxQuestions.org on (#526WS)
Hello, folks. I was hoping I could get some help because I am completely stumped! I have tried different combinations and have not been able to figure it out. The question is:

Use ls -l and grep to find all the files in the directory /etc that were last modified in March.

I have tried a few of the following:

1. ls -l /etc | grep "Mar"
2. ls -l -f /etc | grep "Mar"
3. grep -l "Mar" /etc | ls -l
4. ls -latr /etc | grep "Mar"
5. ls -fl /etc | grep "Mar"

And so on, ad nauseam. I do not get the results I am looking for, and I cannot figure it out. I would appreciate a nudge in the right direction. Thanks.latest?d=yIl2AUoC8zA latest?i=W1_7bm-NDzM:pMJgWhwMflw:F7zBnMy latest?i=W1_7bm-NDzM:pMJgWhwMflw:V_sGLiP latest?d=qj6IDK7rITs latest?i=W1_7bm-NDzM:pMJgWhwMflw:gIN9vFwW1_7bm-NDzM
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments