---

Linux cool hacks – Part II

” Hello there, dear readers. Time for the second article of
highly useful, cool and fun utilities, commands, and tricks that
should help you gain better productivity and understand your system
better. In the first part, we learned about a whole bunch of great
things, including top in batch mode, how to read process account
logs, how to measure system activity with a range of programs, and
how to write a simple UDP server-client.

“Now, let’s see a few more tricks that will help you master a
higher, cooler level of Linux knowledge and allow you to impress
you significant others, including your boss.

“1. Sparse files

“What they be, you’re askin’. Well, sparse files are normal
files – except that blocks containing only zeros are not really
counted. In other words, empty space inside sparse files is just
listed, without actually taking any physical space. This, in
contrast to regular files, where everything is preallocated,
including bits that hold no data.

“If you’re a fan of virtualization, you have come across sparse
files – virtual machines disks can be sparse files. If you’re
creating virtual machines with, say 10GB space, but do not
preallocate it, then you have witnessed sparse files in action!
Dynamically expanding virtual disks are sparse files.”

Complete
Story

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis