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&nbsp;<code>while</code>&nbsp;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>&nbsp;specifies the input file for the&nbsp;<code>dd</code>&nbsp;command. In our case, the input file is&nbsp;<code>/dev/urandom</code>, a file which produces pseudo-random numbers in Unix-based systems.</li> <li><code>of</code>&nbsp;specifies the output file for the&nbsp;<code>dd</code>&nbsp;command. In our case, the random data is written to a file named&nbsp;<code>randomfile</code>&nbsp;in the&nbsp;<code>/tmp</code>&nbsp;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>