There are 2 ways to RAID10 with mdadm. With 1 layer of mdadm or with 2 layers of mdadm. I would prefer the 1 layer of mdadm (meaning using mdadm level 10Read More…
Bash/Linux – Folder Flattening Script (keep X number of subfolders)
A folder flattening script for your files. Takes files and folders in a location & makes the folder tree less deep (if files have same name it will rename a file so thatRead More…
AWK RETURNS ERROR WHEN PRINTF PASSED A VARIABLE WITH PERCENT SIGN %
# echo "thislinehas%allovertheplace%%asdf%%" | awk '{print $0}' thislinehas%allovertheplace%%asdf%% Really quick… the above and below commmand simply tells awk to print the inputed line, so that the output should look as if itRead More…
AWK – convert BYTES to HUMAN READABLE
Use this convertbytes2human function, If you want to convert a number of bytes (for example 43252) or an exponential number number of bytes (such as 1.03e5) to a human readable size. NOTE: sinceRead More…
AWK – missing ABS – Absolute Value
# Awk is missing ABS – absolute value – so we have to make it. # if you want to do: y=abs(x) # you cant just write the above as abs(x) isRead More…
BASH – Seconds to Split Time / Human Readable Converter – Convert seconds to hours, minutes, seconds
This will convert a second into a more feasible number split up into parts of hrs/min/sec (or if you want also days and weeks and years) Provided 5 configurations of this converterRead More…
Solaris interface stats with netstat & ndd
Solaris “ifconfig” and “ifconfig -a” miss out on interesting values like “error” & “drop” etc. netstat and ndd are its replacement in that case # see common stats – usually seen withRead More…
Changed Windows 8.1 Font to Monospace Front, i.e. Consolas
From this video: https://www.youtube.com/watch?v=tBxoR4TBdks NOTE: this is also how you would change the default font of many apps as they use the default Windows font. So I really just wanted to changeRead More…
Making Rename.pl output prettier – Beautifying rename.pl script/program – converting/fixing filenames article
NOTE: The “rename” tool im using is the perl rename tool sometimes called “prename”, “rename.pl”, or simply rename (sidenote, there is also another similar tool called “rename” tool from a package calledRead More…
DU & LS – APPARENT SIZE vs DISK USAGE Size – Sparse Files and stuff
NOTE ABOUT UNITS BELOW: I incorrectly state they are called Kilobytes, but in reality they are kibibytes. I have the short hand notation correct. A KiB is 1024 bytes. A real KilobytesRead More…