Using Grep & Regular Expressions to Search for Text Patterns in Linux. Introduction One of the most useful and versatile commands in a Linux terminal environment is the "grep" command.
The name "grep" stands for "global regular expression print". This means that grep can be used to see if the input it receives matches a specified pattern. This seemingly trivial program is extremely powerful when used correctly. Its ability to sort input based on complex rules makes it a popular link in many command chains. We will explore some options and then dive into using regular expressions. Table of Contents Basic Usage In its simpest form, grep can be used to match literal patterns within a text file. Let's try an example. Cd /usr/share/common-licenses grep "GNU" GPL-3 The first argument, "GNU", is the pattern we are searching for, while the second argument, "GPL-3", is the input file we wish to search. The resulting output will be every line containing the pattern text. Common Options. Working with PDF Files on Linux. PDF (Portable Document Format) is a popular file format created by Adobe in the early 1990s.
Even before it was released as an open standard in 2008, PDF was widely used for document exchange because of its universal compatibility. In other words, if you want your documents to look consistent everywhere, you should use PDF. It supports font embedding, which means that other users will see the text just like you formatted it, even if they don't have the same fonts as yours.
Note that some fonts are not embeddable, so they are usually automatically replaced by standard system fonts.PDF files can contain interactive elements – form fields, annotations, even 3D objects – and can be digitally signed or encrypted. Adobe has developed nine versions (specifications) of PDF, and each new version is backward-inclusive, meaning that it supports all features added in previous versions.
Original version written in 1994 and published in the Sun Observer Introduction to Sed How to use sed, a special editor for modifying files automatically. There are a few programs that are the real workhorse in the UNIX toolbox. The Awful Truth about sed. Undelete Files on Linux Systems. Unix/Linux "find" Command Tutorial. ©2002–2013 by Wayne Pollock, Tampa Florida USA.
All rights reserved. The find command is used to locate files on a Unix or Linux system. find will search any set of directories you specify for files that match the supplied search criteria. You can search for files by name, owner, group, type, permissions, date, and other criteria. The search is recursive in that it will search all subdirectories too. The syntax looks like this: find where-to-look criteria what-to-do All arguments to find are optional, and there are defaults for all parts.
Linux Man Pages: General Commands. Linux Man Pages. The Linux Documentation Project: Guides. The Linux Documentation Project (LDP) is working on developing good, reliable documentation for the Linux operating system.
The overall goal of the LDP is to collaborate in taking care of all of the issues of Linux documentation, ranging from online documentation (man pages, HTML, and so on) to printed manuals covering topics such as installing, using, and running Linux. Here is the Linux Documentation Project Manifesto and Copyright License for LDP works. Translations of LDP works (languages other than English) can be found on the "Non-English Linux Info" links page. Advanced Bash-Scripting Guide This document is both a tutorial and a reference on shell scripting with Bash.
In this post, I talk about one of my favorite utilities I use regularly – AutoKey.
AutoKey is a real life saver and a great productivity boost for me. There are not much articles about AutoKey and even those few cover very few of its features. I intend to talk about some of my favorite features which I use regularly. I use AutoKey’s GTK version in Ubuntu but most of the points in the post will be applicable to other Linux variants and KDE. Appendix A. Installation Howto. GNU/Linux Installation Guide. Permissions - How can I become the owner of a file/folder that root owns. Linux.