mediainfo: multimedia file stats

mediaIn general, HandBrake or ffmpeg are sufficient to know the details of a media file and start the job. However, there are some specific cases where you may want to know more. for example, what if the lengths of the audio and video files (muxed together) are different and you need to take care of that? You can never be too careful! Continue reading mediainfo: multimedia file stats

vim as an encrypted cloud note manager

vim_compvim is one of the most popular editors on Linux. You can edit multiple notes in vim simultaneously. However, it is not a generic note manager by design. You can turn it into one using the vim-notes plugin, which also means you need to remember more commands. We already explored how to encrypt files with vim. Let’s try a simple way to turn vim into a note manager. I use it everyday for my notes. Continue reading vim as an encrypted cloud note manager

Extract exe & cab files on Linux

extract_compLinux users can run exe files using wine. What if you want to extract the contents of MS executables or cabinet files on Linux? This article explains the cmdline way and is a follow-up of our earlier article on enabling extra compression formats on Linux. Continue reading Extract exe & cab files on Linux

The beauty of Linux utilities

tux_compNot long ago, I noticed a user complaining about the very philosophy of Unix (and Linux) tools – do one thing and do it well. As per him, the *nix systems are a combination of loosely coupled utilities which don’t work well together. Of course, as a hardcore terminal user, I wasn’t aligned. However, today I found solid reasons why Linux userland is best the way it is designed. Continue reading The beauty of Linux utilities

Change disk I/O scheduler on the fly

diskThe Linux kernel supports 4 I/O schedulers for disks:

  • Deadline: minimizes disk seeks in order to provide best possible response time Default on Ubuntu.
  • Anticipatory: Adds an anticipation heuristic on top of deadline I/O scheduler. It spends a few milliseconds in anticipation that new requests in the same area might appear. However, if there are no further requests, the time is wasted in waiting. Not very common.
  • Completely Fair Queueing: Assigns the requests to multiple queues based on the process requesting the I/O. Services the queues round-robin. Default on RHEL.
  • Noop: No optimization of disk seeks.

Continue reading Change disk I/O scheduler on the fly

bucket: shell clipboard manager

terminalbucket is like vim copy paste registers, only for the shell (bash and fish currently). You can save text clips in a bucket for later use. Though the name is bucket, it’s actually a bucket management system. There are multiple buckets involved, or you can use the default unnamed bucket. Continue reading bucket: shell clipboard manager

Find fastest Ubuntu mirror from cmdline

ubuntu_logo_81x81It’s always advisable to keep your Ubuntu installation up to date with the latest packages and security patches. During installation Ubuntu sets the main repository as the source of latest packages. But what if the default is too slow for you because of your geographic location? Continue reading Find fastest Ubuntu mirror from cmdline

vim: list all matching lines

vim_compOne of the coolest features of Notepad++ is you can find all matches (occurrences) of a pattern in a file in a list. Here are some ways to do the same in vim, sans any external plugin.

1. vimgrep (Error List)

This is a command to be used in the vim command mode. The syntax is:

:vimgrep pattern %

To open the list of matches in a buffer:


Use <Up> and <Down> keys to navigate the list, <Enter> to select a match. Traverse the matches in the open file using <n> and <N> the regular way.

Note that you can replace vimgrep with normal grep. This will increase one step (lists on the console first) but works almost the same way.

2. lvim (Location List)

Run the following in the command mode:

:lvim pattern %

To open the list


Navigation is similar to that in vimgrep.

3. global search

To get the list of all matches in the file, run the following in command mode:


Note that grep got its name from this command sequence!