Unable to "grep" on /etc directory, tutorial 5

Problem completing one of the interactive tutorials?

Moderator: drgrussell

Post Reply
medinita3586

Unable to "grep" on /etc directory, tutorial 5

Post by medinita3586 » Tue Dec 09, 2014 2:50 am

Hello anyone or everyone: I have been practicing my Linux in these tutorial that are such an amazing learning tool and I have come to a point in which I am doing question 9 which consist of: Use ls -l and grep to find all the files in the directory /etc that were last modified in August (hint: try looking for the case sensitive string "Aug"). Send this list to s6, and I always get the message: "grep /etc: Is a directory, so I am not able to use the "grep" command and redirect the result to the s6 file.
What do I need to be able to solve this issue?

Please help

Thanks.

drgrussell
Site Admin
Posts: 426
Joined: Sat Feb 12, 2005 8:57 pm
Are you a robot or a human?: Human

Re: Unable to "grep" on /etc directory, tutorial 5

Post by drgrussell » Tue Dec 09, 2014 10:40 am

Use the ls -l command to see the dates, and then pipe it to grep.

medinita3586

Re: Unable to "grep" on /etc directory, tutorial 5

Post by medinita3586 » Thu Dec 11, 2014 2:10 am

Thanks for your reply but can you please explain how to "grep" on the /etc directory? I was able to do ls -l on the directory but when I try to grep, it just won't let me and it gives me the message: /etc is a directory and I can't go any further. Please help

Thank you

drgrussell
Site Admin
Posts: 426
Joined: Sat Feb 12, 2005 8:57 pm
Are you a robot or a human?: Human

Re: Unable to "grep" on /etc directory, tutorial 5

Post by drgrussell » Thu Dec 11, 2014 9:13 am

http://linuxzoo.net/page/manipulate_pipe.html

Build the data with the ls command then pipe it to the grep.

medinita3586

Re: Unable to "grep" on /etc directory, tutorial 5

Post by medinita3586 » Sat Dec 13, 2014 2:36 am

Thank you so much. That was it!! Very clever solution, my dilemma was solved.

Thank you again.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests