Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Fundamentals of Linux

You're reading from   Fundamentals of Linux Explore the essentials of the Linux command line

Arrow left icon
Product type Paperback
Published in Jun 2018
Publisher Packt
ISBN-13 9781789530957
Length 234 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Oliver Pelz Oliver Pelz
Author Profile Icon Oliver Pelz
Oliver Pelz
Oliver Pelz Oliver Pelz
Author Profile Icon Oliver Pelz
Oliver Pelz
Arrow right icon
View More author details
Toc

Essential Linux commands

In this section, we will learn more essential Linux Bash commands that every Linux user should know. Use the cat command to quickly cut columns out of text files. This is like a light version of awk.

We'll be discussing the following commands:

  • cat
  • sort
  • awk
  • tee
  • tar
  • Other miscellaneous commands

First, let's create a smaller version of the passwd file to work with the cat command:

-d sets the field delimiter; by default it's the tab character. -f uses a single field number or comma-separated list of field numbers that you want to extract. If using comma-separated lists also, the split input delimiter will be output, which can be changed using -- output-delimiter.

Next, let's create a smaller version of the services file without comments and empty lines. Using the cat command is very limited to the special use case that a file separator...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image