Searching in Linux: Regular Expressions for Beginners

Find the files you are looking for and select only the useful lines with find, grep and regular expressions.
4.5 (40 ratings)
Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
1,965 students enrolled
Sale Ends Today!
25% off
Take This Course
  • Lectures 17
  • Length 1 hour
  • Skill Level Beginner Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works


Find online courses made by experts from around the world.


Take your courses with you and learn anywhere, anytime.


Learn and practice real-world skills and achieve your goals.

About This Course

Published 2/2016 English

Course Description

Do you want to master regular expressions? Would you like to be able to search for files from the Linux command line based on their name, owner, permission or size? Do you want to be able to perform an action on any file of a specific type? Take this course and find out how.

This course will first take you through the basics of command line, changing and listing directories, wildcards, file and directory permissions. Even if you are an experienced Linux user, you might learn some interesting things from these lectures.

After this, you will go through the options, expressions and actions that are supported by the find command. You will be able to find files that, for instance, are owned by a particular user and exceed, or are under, a specific size. Or, you will be to do specific actions on specific files at the same time with only one command (e.g. create multiple archives based on the file types). I will also teach you about the locate command and its advantages and disadvantages over find.

The third section is about grep and regular expressions. I will help you take your first steps in learning regular expressions. They are a very powerful pattern matching tool. You will be able to use them together with grep to select particular lines inside files or on streams received at the standard input. You will see plenty of examples to understand what the metacharacters of regular expressions actually mean and how to use them to match strings.

What are the requirements?

  • Little to none experience with a Linux system
  • A host or a virtual machine running Linux is needed

What am I going to get from this course?

  • Find any file on a Linux filesystem
  • Use regular expressions in able to select files containing matching patterns.
  • Master the find, locate and grep commands
  • Understand Linux filesystem structure and file permissions

Who is the target audience?

  • Linux beginners and intermediate users.

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.


Section 1: Introduction

Quick walk-through of the curriculum of this course.

Section 2: Linux Folder Structure

How to navigate around the Linux directory structure. So you think you know all about the cd command...?


Watch this lecture to see what ls can do.


Basic file matching using the *,?,[] and {} wildcards.


You will learn how to keep others from overwriting your files.

4 questions

A few questions on setting and resetting file permissions


You must be able to execute directories.

Section 3: findutils - find and locate

Search for files based on their name.


Find files based on their owner.


See which files take the most space.


Put all criteria together in expressions.


Take actions on the files you find.


... and even more actions.

2 questions

Recap of the find options


Find files faster with locate and updatedb.

Section 4: Searching in Files - grep

Search inside file using grep.


Introduction to regular expressions.


... continued.


How to use grep together with regular expressions.

3 questions

A few questions on regular expressions and grep

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Andrei Bunghez, Embedded Software Engineer | PM | Android Rookie

Hello! I am a passionate software engineer working mostly in the embedded networking world. I have a degree in Computer Science from the Politechnica University in Bucharest, major in Compilers and Operating Systems and have recently obtained an Android Developer Nanodegree from Udacity.

I have been an embedded software engineer for the past 12+ years, developing and maintaining software for a range of Ethernet devices. During this time I have been responsible for various parts of these systems, ranging from the higher levels of networking protocols like VLAN, STP, SNMP to chip drivers and distributed programming across Ethernet switches. At some point I started leading software releases and did a partial shift to project management, while still maintaining a keen interest in the embedded software practice. In the past few years I have added Android and Arduino on my list of interests and I am now working on a small pet project related to air quality, tying these two platforms together.

I usually prefer learning by example. So, it is only natural that this becomes my preferred way of teaching as well. My lectures are filled with examples that illustrate the main presented concept or topic.

I'm looking forward to seeing you in my courses!

Ready to start learning?
Take This Course