blog:tasks_that_are_best_done_on_the_command_line

Tasks that are best done on the command line

Here are a few tasks that you might want to consider using the command line for.

Unless you are doing some sort of cropping there is no reason to load up Photoshop or the Gimp. A simple command will usually suffice for almost all your image resizing needs.

convert -resize 300 image.jpg image-small.jpg

If you finding yourself doing lots of image resizing during the day, this command could potentially save you a LOT of time. You can even do mass image resizing.

I found myself spending a ton of time adding drop shadows to images. Using a simple command I was able to create drop shadows in seconds.

convert screenshot.jpg \( +clone -background black -shadow 60×5+0+5 \) +swap -background white -layers merge +repage shadow.jpg

Note: You must have Imagemagick installed for this command to work. Debian/Ubuntu users can use apt-get install imagemagick.

Obviously, I don’t expect you to memorize this command. To shorten it use an alias.

If you want simple MP3 splicing this command has your back:

cat 1.mp3 2.mp3 > combined.mp3

DD is one the most simplistic and powerful image applications out there.

dd if=/dev/hda of=/dev/hdb

Why open up K3B or some other program just to burn an ISO? Map this command to an alias and get burning.

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

Note: You need to get the info for the ‘dev=’ part by running ‘cdrecord -scanbus’

Let’s say you want to convert an AVI to an Mpeg file:

ffmpeg -i video_origine.avi video_finale.mpg

Or convert an Mpeg to AVI:

ffmpeg -i video_origine.mpg video_finale.avi

There are all sorts of things you can do with ffmpeg.

No need to open up a GUI text editor when you have sed.

This command from Eric’s Wendelin’s blog will replace all instances of a color in CSS with another one.

sed ’s/#FF0000/#0000FF/g’ main.css

Source: http://www.nixtutor.com/linux/7-tasks-you-shouldnt-use-a-gui-for/

~~LINKBACK~~ ~~DISCUSSION~~

  • blog/tasks_that_are_best_done_on_the_command_line.txt
  • Last modified: 2009/07/29 18:12
  • by brb