Linux/Mac Terminal Tutorial: The Grep Command - Search Files and Directories for Patterns of Text

preview_player
Показать описание
In this Linux/Mac terminal tutorial, we will be learning how to use the grep command. The grep command allows us to search files and directories for patterns of text. You can also pipe the output of one command into grep to get certain matches. It's extremely useful once you learn the ins and outs. Let's get started...

The code from this video can be found at:

✅ Support My Channel Through Patreon:

✅ Become a Channel Member:

✅ One-Time Contribution Through PayPal:

✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey's Public Amazon Wishlist

✅ Equipment I Use and Books I Recommend:

▶️ You Can Find Me On:

#Linux #Mac
Рекомендации по теме
Комментарии
Автор

I like that this guy just gets straight to the point and wastes no time. I like this man already!

whenthethebeansstrikeback
Автор

6:35 $ grep -win -C 2 "find this string" ./*
8:05 $ grep -winr "Find that string even in subdirs" ./*
9:35 $ grep -wirl "List those files that contain this string in current directory dot" .
10:20 $ grep -wirc "List those files that contain this string and number of occurrences in current directory dot" .
11:10 $ history | grep "search for git commits in history"
12:00 $ history | grep "search for git commits" | grep "now narrow down to some string"
15:40 only for mac: $ brew install grep --with-default-names #to allow regular expressions based on perl, as shown in 17:56.
19:13 Homework!

latlov
Автор

Wow your tutorial made grep SO much simpler. Thanks!

Spladoinkal
Автор

Great tutorial. Now I understand the grep command much better and I'm looking forward to understand more about regular expressions. Thank You !

andremorency
Автор

There are very few tutorial which gets straight to the point, this is one of them. Really enjoyed learning, Extremely instructive.

Thank you.

msurajnair
Автор

I just ended up watching your Python OOP series. and i randomly looked for some Linux tutorials, and i was SOOO happy to see your name!

uuzumakifox
Автор

Mann....You are a legend...Only few people are out there like you..You really are a gemstone. Thank you soo much for this awesome tutorial brother ❤️ No wasting time, straight to the point. God bless you.

Love from Kerala ❤️

VishKnew
Автор

awesome ...I really like your style in explanation Corey which i feel like i'm enjoying while watching your tutorials :)

ahmedmahdy
Автор

I like how this was explained. Straight to the point and simple, very easy to understand.

kenthn
Автор

outstanding !!!. Dear Corey, appreciate for your time posting your tutorials. I am enjoying teaching style. Thanks again!!

mathewkargarzadeh
Автор

Excellent. Straight to the point. Concise and precise. Love it 🤩

younesmdarhrialaoui
Автор

Clearest most concise tutorial I have found! Thank you!

jhnthnd
Автор

Some folks are intelligent and smart but are horrible at teaching. Corey is smart, intelligent and born to be a teacher. While I am going to contribute on patreon right away, you have a gift that you can use to sell your videos at a small price to benefit and educate the population. Amazing

MrTommycat
Автор

So glad I looked at this tutorial. I've known how to kind of use grep for a while. Some of these options are going to be super helpful to me in the near future. I should have looked in the man pages a long time ago!

CrushOfSiel
Автор

Great video ! Great explanation. I like that it goes beyond the basic use. Thank you for sharing.

mickaelriga
Автор

After seeing one video, i am addicted to watch more. Thank you friend

thrilochanpakkapoti
Автор

Coincidentially, I had just tried out grep yesterday after completing the "Terminus" game. Today my colleague was very impressed when in a matter of seconds, out of 7500 case files, I picked those 40 or so which contained one certain word. also you can export the results easily into a file (I use &>>filename.txt (.csv also works)), which might come in handy if your boss wants "all the contracts with the Miller Company ASAP", or if you want to quickly mail a list of relevant files. As always, great video!

spot
Автор

Brilliant.

Thank you for taking the time to help me understand grep, I really appreciate your thoughtfulness Corey.

JordanCrawfordSF
Автор

very easy to understand :) thank you!!

gokiburi
Автор

This video is definitely getting saved for future use

kenchiken