Linux Crash Course - The grep Command

preview_player
Показать описание
The "Linux Crash Course" series (formerly known as the "Linux Essentials" series) tackles important concepts around Linux, one video at a time. In this video, Jay goes over the basics of the grep command, along with some useful examples.

Thanks to Linode for supporting this video!

*Support Learn Linux TV*
Note: Commission may be earned for any and all links presented here.

*⏰ TIME CODES*
00:00 - Intro
00:38 - Check out Linode and get your very own Linux server!
01:58 - What is "grep"?
03:12 - Piping the cat command into grep
03:58 - How to omit a search string
04:49 - Running grep by itself
05:32 - Using grep against a sample file
07:33 - Showing line numbers with results
08:00 - Additional options with the grep command
10:06 - Using grep against multiple files
10:55 - Recursive search with grep

## Blog article for this video:

*🌐 LEARN LINUX TV ON THE WEB*

*⚠️ DISCLAIMER*
Learn Linux TV provides technical content that will hopefully be helpful to you and teach you something new. However, this content is provided without any warranty (expressed or implied). Learn Linux TV is not responsible for any damages that may arise from any use of this content. Always make sure you have written permission before working with any infrastructure and that you are compliant with all company rules, change control procedures, and local laws.

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

Love these series Jay, thanks very much.
What I really appreciate in your videos is, that you explain the meaning/naming of options in the commands. For example "-r" for "recursive", or "-i" for "insensitive". This helps very much to memorize these options, because they are endless when it comes to shell commands ;-) Keep up your great work Jay, thanks.

TradersTradingEdge
Автор

I´d love to see a episode on advanced grep use-cases. I´m often supprised how powerful and useful this little application is.

Ladida
Автор

Hello Jay
only to say thank you so much for this video
i'll watch it like a good dozen of times
you actually realized an old dream that even books wasn't able to make possible
Stay blessed and I stay tuned

theunclemez
Автор

Thanks Jay. I never looked at the man page because I tend to use find, but you explained it very clearly. Grep demystified! I'll be using it a lot more now.

BrianKismetDesign
Автор

Thank you for this! I didn't need to take notes because your way of teaching made it so easy to learn and remember for future application.

fehwejq
Автор

Jay, next week do "How to do your taxes with the 'find' command!" 😁 'find' has soooo many options that it probably requires 3-4 videos...

ddEEE
Автор

Excellent tutorial! I've only used `grep` by looking up examples, but now I'll try and use it from scratch like your examples. This video was well formatted and informative, thank you.

chrisa.
Автор

great video and great content. production was there and I am excited to keep using your short and specific videos to help me further my understanding of terminal thank you for doing this.

rileyf
Автор

Needed a refresher and this was a great/concise overview

TheCodeAlwaysWins
Автор

Corrections for "-c" option.


"-c, --count print only a count of selected lines per FILE.."


So if there are 2 or more occurances in a line, it count as 1.

Thank you.

bahathir_
Автор

After using grep the non-optimal way I finally learned how to do better. Thanks for the video.

volkervitt
Автор

Thank you so much this really helped with completing my assignment

Bubbasaure
Автор

I also use -l to list only the filenames which contain the search term. and also zgrep for when the files are compressed. Great video!

jmlc
Автор

THAT IS A INCREDIBLE TEACHING WORK, THANK YOU VERY MUCH.

onuronel
Автор

your videos are super helpful, I appreciate your work.

duamalik
Автор

Often the reason people use the format "cat file.txt | grep term" is because they want to search for multiple terms separately. I can can tap the up arrow to get the previous command then easily change "term" since it's at the end of the command where the cursor will be. For a command in a bash file, I would use "grep term file.txt" to keep it shorter.

mikegropp
Автор

I use "grep" for a couple of years now and did not know I could use it individually, without pipping it as with "cat", "less" or so...
This command is more powerful than I was thinking =)

nkmicros
Автор

Super cool, very useful, thank you very much.

georgehope
Автор

Grep is what got me into Unix, it is hands-down my #1 favorite program ever written, I use it for everything! If I hadn't found grep I'd probably still be using Linux like Windows, it opened up a whole world for me.

Mythologos
Автор

Good one Jay. Thanks for the detailed examples. The grep -ri is very powerfull and I'll be using it many times...

oskar