jueves, enero 08, 2009

Trucos Terminal Ubuntu.

Sacado de www.quicktweaks.com, que está a la venta; así no se pierde el contenido.

Challenge #1 Browse and display images in Terminal

Wtf! Browse and display images in Terminal? Is this possible? Yes it is! To browse the images in the current directory:
$ sudo zgv
To browse the images in /home/username/pictures directory:
$ sudo zgv /home/username/pictures

Note: If you get any mouse not initialized message, just unplug your mouse, run zgv and plug your mouse back

Challenge #2 Burn a CD/DVD/BluRay Disk

Windows users might think that this is as easy as copying and pasting a file into CD/DVD writer folder. But let’s add a twist; make an ISO image of a large folder and burn them to a CD/DVD. Windows users can download a Trial Version of Nero while Linux users can finish this challenge:

Crate an ISO image (myISOFile) out of a folder (or filename)
$ mkisofs –r –o myISOFile.ISO folderOrFilename

Now burn the above ISO image to a CD/DVD
$ cdrecord --device=cdwriter-device -tao -eject myISOFile.ISO

Windows users if you are back after downloading and installing a heavyweight disc burner then let’s move to another challenge

Challenge #3 Create ASCII text graphics

What about creating some ASCII graphics such as the following? You can paste it in your email as a signature to impress your friends.

$ figlet Linux This is displayed with the default font, to use other fonts, give a font name after switch f: $ figlet quick tweaks –f script

Challenge #5 Split a large file into several pieces
If you have a large file of about 1 GB size and have two CDs to spare, how can you carry that 1GB file? Windows users any idea?
$ split –b500m myBigFile mySmallFIles.
To join the smaller files to get the big files back:
$ cat mySmallFiles.* > myBigFile

Challenge #6 Take screenshot and save it as png file

Windows user might have got some relief to have this challenge because it’s just about pressing PrintScreen key on the keyboard, opening up MSPaint, pasting, and saving as .png. Phew! Don’t you guys get tired? Anyways, I appreciate that you guys did it. But wait! Let me add a little twist – How about taking a screenshot of a rectangular area on your screen?
My Screenshot

Screenshot taken with import command

$ import –frame myScreenShot.png

After this command, the mouse pointer changes to a set of cross-hairs; left-click and drag the mouse across an area of the screen and release the mouse to capture the selected area.

Challenge #7 Resize an image, put a border around it, and add a comment

That should be enough for the day for Windows users, but Linux users aren’t that lame. Move on!
$mogrify -geometry 300×200 -border 8×8 -comment “Windows Sucks” myScreenShot.png
Challenge #8 Add sound effects to a sound file such as chorus, echo, flange etc

Well, I think this challenge is going to be an annual project for Windows users, so let me not be so strict. What about this – convert a wav file into mp3?
$ lame myMusicFile.wav myMusicFile.mp3

Challenge #9 Display a nicely formatted calendar for a particular year

$ cal 1972
Challenge #10 Mirror a website to browse the site offline

This is a very common challenge; mirror a website to your local computer for offline viewing experience:
$ wget -mk http://example.com

This is the end of 10 Challenges. BTW What about doing some Math? Factorial of 10 please! (Windows users can use pen and pencil, just like those high school days)
$ calc fact 10

I hope at this point Windows users have successfully downloaded and installed Ahead Nero and those with latest Intel CPUs and 4GB RAM might have burned a CD too. Linux users have already completed 10+1 challenges.

This is just the tip of the iceberg. Linux Terminal is much powerful than this. You might haven’t realized the power of Linux Terminal and might have always hated it. It’s so sad that Linux gets hatred because of its powerful and wonderful virtue. Format your C: drive, install any Linux flavor, learn some commands, and live a geek life!

No hay comentarios: