Posts Tagged “command-line”:

Linuxfest 2013, mass mail...

Today while I had to send out emails to attendees of Linuxfest 2013, I sat down thinking of a way to mass-mail. The emails should display the name of attendees so that they may notify me if it’s mistyped. Sendmail and a bunch of command line utils could do the... [Read More]

Microsoft Windows Command Line Cheat-Sheet

I can imagine my friends’ sarcastic smiles when they will read this post. Being an open source advocate I don’t often write about Microsoft Windows or other proprietary software. ![](/img/2017/02/MSFT_logo.png) Well, during the day I had a discussion on facebook with Sacheetabye who was having trouble getting XAMPP to work... [Read More]

find – explained through a screencast

I usually enjoy my Sunday doing something new, creative … like a few months back I started drawing. Then I paused but I think I’ll get back to drawing soon. Anyway, drawing will be for another Sunday. Since I re-installed openSUSE 12.3 with MATE on my laptop I haven’t installed... [Read More]

Bootable Linux Pendrive

![](/img/2017/02/liveusb-icon.jpg) Many times I’ve seen people asking how to make a Linux bootable USB drive. These tools should be helpful if you’re running a Linux desktop already: – [UNetbootin]( – [USB ImageWriter]( However my favorite utility is dd. It’s usage is straight-forward by specifying an input file and an output... [Read More]

KDE: Trash has reached its maximum size

Ever came across an error in KDE saying “The trash has reached its maximum size! Cleanup the trash manually.” ? ![](/img/2017/02/kdetrash-1.jpg) First check the metadata file from the trash folder to see if the size is consistent with its content. ``` cat ~/.local/share/Trash/metadata ``` If it’s not, then do: ```... [Read More]

xargs - command-line arguments

**xargs** is a nice utility that works in conjunction with pipes to construct argument lists and pass the same to other utilities. Here’s how I’d search and remove all HTML files: ``` find . -name "*.html" -print | xargs rm -f ``` [Read More]

Send mail from command line

Ever needed to send a mail from the command line. It’s pretty simple (provided you already have a mail transfer agent running such as postfix or sendmail). ``` echo “Type email content here” | mail -s “Your subject” -a attachement-filename.png [email protected] ``` Let’s say your account name on your PC... [Read More]

dd to backup hard drive

A friend gave me his 10 yrs old broken laptop which he had kept among junk for years. He asked me if it was possible to retrieve his emails from the laptop. Obviously my answer was if the hard drive is still alive then “yes”. Now working on such old... [Read More]

Qemu-KVM, VM with shared folder

Start a VM from command line with a shared folder on the host machine: ``` qemu -m 1024 /data/VM/Windows_XP/Windows_XP.img -usbdevice tablet -full-screen -vga std -net nic -net user,smb /path_to/foldername ``` It’s the -smb option that does the trick. It requires samba for sharing resources (using cifs protocol). “-usbdevice tablet” regulates... [Read More]

Convert nrg to iso

Yet another awesome use of the dd utility. Here’s how an nrg format image file can be converted to iso. ``` dd bs=1k if=image1.nrg of=image2.iso skip=300 ``` [Read More]

the correct find

Here’s an unbreakable way of using the find command across various Unix/Linux platforms: ``` find . -type f -exec ls -l ‘{}’ ‘;’ ``` Notice the single quotes. [Read More]

Unix - extract a tgz or tar.gz

Compressed UNIX tar archives (typically tar.gz or .tgz extensions) can be extracted in a single command. This is faster and works with less disk space. To extract the compressed tar archive filename.tar.gz into the current working directory with: ``` gzip -dc filename.tar.gz | tar xf – ``` If the file... [Read More]

Format and rename USB drive

I got a 1TB Toshiba Portable Drive and I was looking for a way to format and label the drive. While searching here’s what I stumbled upon, pretty quick & easy: ``` mkdosfs -n ‘YOURLABEL’ -I /dev/sdb1 ``` The same can be achieved using mkfs as follows: ``` mkfs.vfat /dev/sdb1... [Read More]

Call a cow

Now… This is fun. Do you want to call a cow in Linux Mint? Wondering what is it about? Ok, open Terminal and type the following: ``` apt-get moo ``` What do you get? [Read More]

Unix commands on Windows

I met a guy at my new workplace and he showed me a nice way of not losing temper when working with Command Prompt (yep, on a Windows box) and accidentally typing unix commands. Imagine if you could use the commands like ls, mv, cp, du, and even wget. Wouldn’t... [Read More]

Change keyboard layout in terminal

Working with virtual servers (accessed from various locations/countries), we’re often faced with situations like this: the server has a UK or FR layout and our keyboard is US. To get around this we can reload the key map. One command that works on all Linux platforms is loadkeys. E.g. to... [Read More]

Linux, a cat & dog story

We’ve all enjoyed the awesomeness of the ‘cat’ command. We’ve surely had good time catting files. Well… Now, you can start dogging files. Yep! You do have a ‘dog’ command. It’s not available on the repos; just download it from > and then: ``` dpkg -i dog_1.7-8_i386.deb ``` Now... [Read More]

Change storage engine in MySQL

You can determine a list of storage engines by using the show engines command within MySQL. ``` mysql> show engines; +------------+---------+------------------------------------------------------------+ | Engine | Support | Comment | +------------+---------+------------------------------------------------------------+ | MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | | HEAP | YES | Alias... [Read More]