<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>GNU and Unix Commands on AminBytes</title><link>https://aminbytes.dev/bytes/gnu-and-unix-commands/</link><description>Recent content in GNU and Unix Commands on AminBytes</description><generator>Hugo</generator><language>en</language><atom:link href="https://aminbytes.dev/bytes/gnu-and-unix-commands/index.xml" rel="self" type="application/rss+xml"/><item><title>Work on the command line</title><link>https://aminbytes.dev/bytes/gnu-and-unix-commands/command-line/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://aminbytes.dev/bytes/gnu-and-unix-commands/command-line/</guid><description>&lt;p&gt;Almost everything in LPIC-1 happens in a terminal. Installing packages, reading logs, managing users, fixing a broken boot: you type it all into a &lt;strong&gt;shell&lt;/strong&gt;, the program that reads your commands and runs them. On Linux that shell is almost always &lt;strong&gt;Bash&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Process text streams using filters</title><link>https://aminbytes.dev/bytes/gnu-and-unix-commands/text-filters/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://aminbytes.dev/bytes/gnu-and-unix-commands/text-filters/</guid><description>&lt;p&gt;Linux is full of text: config files, logs, command output, CSV exports. Instead of one big program that does everything, you get many small &lt;strong&gt;filters&lt;/strong&gt;. A filter reads text (from files or from standard input), changes it in one simple way, and writes the result to standard output. Chain a few of them with a pipe &lt;code&gt;|&lt;/code&gt; and you can answer questions like &amp;ldquo;which IP hit my server most often?&amp;rdquo; in one line.&lt;/p&gt;</description></item><item><title>Perform basic file management</title><link>https://aminbytes.dev/bytes/gnu-and-unix-commands/file-management/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://aminbytes.dev/bytes/gnu-and-unix-commands/file-management/</guid><description>&lt;p&gt;Creating, copying, moving and deleting files is the bread and butter of Linux work. You do it in the shell because it&amp;rsquo;s fast, it works over SSH, and one command can handle a thousand files. Wildcards let you name many files at once, &lt;code&gt;find&lt;/code&gt; locates files by name, size or age, and &lt;code&gt;tar&lt;/code&gt;, &lt;code&gt;cpio&lt;/code&gt; and &lt;code&gt;dd&lt;/code&gt; copy whole trees or disks.&lt;/p&gt;</description></item><item><title>Use streams, pipes and redirects</title><link>https://aminbytes.dev/bytes/gnu-and-unix-commands/streams-pipes-redirects/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://aminbytes.dev/bytes/gnu-and-unix-commands/streams-pipes-redirects/</guid><description>&lt;p&gt;Every Linux command talks through three channels: one for input, one for normal output and one for errors. Once you know them, you can send output into a file, throw errors away, feed a file into a command, or connect commands together so the output of one becomes the input of the next.&lt;/p&gt;</description></item><item><title>Create, monitor and kill processes</title><link>https://aminbytes.dev/bytes/gnu-and-unix-commands/processes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://aminbytes.dev/bytes/gnu-and-unix-commands/processes/</guid><description>&lt;p&gt;Every command you run becomes a &lt;strong&gt;process&lt;/strong&gt;: a running program with its own memory, its own owner and a number called a &lt;strong&gt;PID&lt;/strong&gt; (process ID). A server runs hundreds of them at once. As an admin you need to start them the right way, see what they&amp;rsquo;re doing, and stop the ones that misbehave.&lt;/p&gt;</description></item><item><title>Modify process execution priorities</title><link>https://aminbytes.dev/bytes/gnu-and-unix-commands/process-priorities/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://aminbytes.dev/bytes/gnu-and-unix-commands/process-priorities/</guid><description>&lt;p&gt;A Linux machine runs many more processes than it has CPU cores. The kernel&amp;rsquo;s scheduler decides who gets the CPU next, switching between them many times per second. Most of the time that&amp;rsquo;s fair and you never notice. But sometimes a heavy job, like compressing backups or building software, slows down everything else. Then you want to tell the scheduler: &amp;ldquo;this one can wait&amp;rdquo; or &amp;ldquo;this one is important&amp;rdquo;.&lt;/p&gt;</description></item><item><title>Search text files using regular expressions</title><link>https://aminbytes.dev/bytes/gnu-and-unix-commands/regular-expressions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://aminbytes.dev/bytes/gnu-and-unix-commands/regular-expressions/</guid><description>&lt;p&gt;Sooner or later you need to find something in a pile of text: every failed login in a log, every config line that isn&amp;rsquo;t a comment, every email address in a dump. Searching for a fixed word isn&amp;rsquo;t enough when the thing you want &lt;em&gt;varies&lt;/em&gt;. A &lt;strong&gt;regular expression&lt;/strong&gt; (regex) is a pattern that describes text: &amp;ldquo;a line that starts with a date&amp;rdquo;, &amp;ldquo;three digits, a dash, four digits&amp;rdquo;, &amp;ldquo;either ERROR or WARN&amp;rdquo;.&lt;/p&gt;</description></item><item><title>Basic file editing</title><link>https://aminbytes.dev/bytes/gnu-and-unix-commands/file-editing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://aminbytes.dev/bytes/gnu-and-unix-commands/file-editing/</guid><description>&lt;p&gt;Sooner or later you&amp;rsquo;ll edit a config file on a server with no graphical desktop: over SSH, in a container, or in a rescue shell after a bad boot. The one editor you can count on in all of those places is &lt;strong&gt;vi&lt;/strong&gt;. It&amp;rsquo;s required by the POSIX standard, so it&amp;rsquo;s on nearly every Unix-like system, and commands like &lt;code&gt;crontab -e&lt;/code&gt; and &lt;code&gt;visudo&lt;/code&gt; drop you into it by default.&lt;/p&gt;</description></item></channel></rss>