63 lines
3.2 KiB
HTML
63 lines
3.2 KiB
HTML
<!DOCTYPE html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="generator" content="pandoc" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
|
<title>Re: My Top 10 Linux Commands</title>
|
|
<style>
|
|
code{white-space: pre-wrap;}
|
|
span.smallcaps{font-variant: small-caps;}
|
|
div.columns{display: flex; gap: min(4vw, 1.5em);}
|
|
div.column{flex: auto; overflow-x: auto;}
|
|
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
|
|
/* The extra [class] is a hack that increases specificity enough to
|
|
override a similar rule in reveal.js */
|
|
ul.task-list[class]{list-style: none;}
|
|
ul.task-list li input[type="checkbox"] {
|
|
font-size: inherit;
|
|
width: 0.8em;
|
|
margin: 0 0.8em 0.2em -1.6em;
|
|
vertical-align: middle;
|
|
}
|
|
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
|
|
</style>
|
|
<link rel="stylesheet" href="/style.css" />
|
|
<!--[if lt IE 9]>
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
|
<![endif]-->
|
|
</head>
|
|
<body>
|
|
<!-- Content placed here will appear directly after the opening <body> tag -->
|
|
<nav class="container">
|
|
<a href="/about/">About</a>
|
|
<a href="/blog/">Blog</a>
|
|
<a href="/music/">Music</a>
|
|
<a href="/notes/">Notes</a>
|
|
<a href="/photos/">Photos</a>
|
|
<a href="/index.xml"><img src="/images/rss-square.svg" width=16 height=16 alt="RSS icon" /></a>
|
|
</nav>
|
|
<hr>
|
|
<!-- Do not remove this opening article element -->
|
|
<article>
|
|
<header id="title-block-header">
|
|
<h1 class="title">Re: My Top 10 Linux Commands</h1>
|
|
<p class="date">2024-08-31T00:00:00-08:00</p>
|
|
</header>
|
|
<p>I came across <a href="https://www.garron.blog/notes/my-top-10-linux-commands.html">this post</a> by Guillermo Garron sharing how to see your most used shell commands. The post says “Linux Commands”, but this will work with any POSIX or POSIX adjacent shell. Just run the following command:</p>
|
|
<pre class="shell"><code>history | awk '{print $2}' | sort | uniq -c | sort -nr | head -n 10</code></pre>
|
|
<p>I thought it would be fun and silly to share my results, which were:</p>
|
|
<pre class="shell"><code>1 history</code></pre>
|
|
<p>The reason why there is only this one command in my top 10 list of most used commands is because I don’t keep that history. My <code>$HISTFILE</code> is set to <code>/dev/null</code>, which helps keep my home folder clean of unnecessary files, and I believe that history is unnecessary. I keep a lot of notes for commands that I need to refer back to later, or I create shell scripts for commands that need to be repeatedly ran. This practice works for me because I feel like I am always starting with a clean slate, while still being able to quickly look up what I need to do with man-pages, my personal notes, or shell scripts.</p>
|
|
<p>Give it a try, delete your history!</p>
|
|
</article><!-- Do not remove this closing article element -->
|
|
|
|
<!-- Content placed here will appear directly before the closing </body> tag -->
|
|
<footer>
|
|
<hr>
|
|
<p>Some dude called Noodles</p>
|
|
<img src="/images/barraconstruction.gif" />
|
|
</footer>
|
|
</body>
|
|
</html>
|