This is a mirror of official site: http://jasper-net.blogspot.com/

Five Great Linux Command Line Tricks

| Tuesday, December 14, 2010
In one of our previous posts we showed you how to convert any audio/video file in Linux. Here’a a neat trick either you might have already heard of or not. In order to do this it’s essential to have ffmpeg installed on your Linux box.

Why bother using a GUI when you can easily get things done with the linux command line? Here’s a detailed tutorial on getting certain things done with the linux command line in just a few seconds!

1. Converting Video

If have already installed it, let’s say you want to convert a video called Original.avi to Final.mpg

ffmpeg -i Original.avi Final.mpg

Or you can use it vice-versa.


2. Burning an ISO to a CD
Still opening GUI’s like Brasero or K3B to burn an ISO file to a CD? This will come in handy for you.

cdrecord -v speed=8 dev=0,0,0 name_of_iso_file.iso

Note: If you are having multiple CD/DVD drivers then you have to substitute the proper value for the “dev=” part by running cdrecord -scanbus


3. Merging MP3s
Well, this command is kind of great because you would never think that you can simply merge two MP3′s with cat command in linux!

cat one.mp3 two.mp3 > merged.mp3

See, Cat has a huge potential in it :)


4. Resizing Images
Why open up GIMP or Shotwell to resize your images unless you have some cropping to be done with the images? For instance, let’s say we want to resize an image to 300px (width)

convert -resize 300 large.jpg small.jpg


5. Cloning a Hard Drive
DD is a very powerful tool when it comes to managing hard disks. Say you have two hard disks want to clone the first hard drive. The command would be

dd if=/dev/sda of=/dev/sdc

Note: If you aren’t sure about the naming conventions of your hard drives. Just run a sudo fdisk -l and change the value of “if=/dev/sda” appropriately. You can name the resulting clone drive anything. But don’t forget to name it without clashing the current drives.


Read more: Tech Hamlet

Posted via email from .NET Info

0 comments: