5 Bash Commands That Make A Computer Completely Unusable (Proceed With Caution!)
<p>These are 5 ways that can make a computer a mere dumpster (temporarily or permanently) and one should never type these scripts in a Bash terminal.</p>
<h1>1. Consuming Disk Space With Random Data</h1>
<p>This script will quickly fill up the storage space on a computer with random data.</p>
<pre>
while true; do
dd if=/dev/urandom of=/tmp/randomfile bs=10M count=100 oflag=direct
done</pre>
<p>The breakdown of the script is given below:</p>
<ul>
<li>In the first step, an infinite <code>while</code> loop is started</li>
<li><code>dd</code>: This is the disk/data duplicator command that allows us to copy raw data from one source to another</li>
<li><code>if</code> specifies the input file for the <code>dd</code> command. In our case, the input file is <code>/dev/urandom</code>, a file which produces pseudo-random numbers in Unix-based systems.</li>
<li><code>of</code> specifies the output file for the <code>dd</code> command. In our case, the random data is written to a file named <code>randomfile</code> in the <code>/tmp</code> directory.</li>
</ul>
<p><a href="https://levelup.gitconnected.com/5-bash-commands-that-make-a-computer-completely-unusable-proceed-with-caution-596e9e06e87a"><strong>Read More</strong></a></p>