Popular Posts


Gnome 3

Get your 'Delete' button back!

Fedora 15 + Eclipse = Android SDK

Setup Android SDK with Eclipse on your Fedora 15

This is default featured post 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured post 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured post 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Showing posts with label cli. Show all posts
Showing posts with label cli. Show all posts

10 June 2011

Mac OS X | iTerm2 : Alternative to default Terminal

For me, terminal come pretty handy when I want to move several files or delete files by wildcard. However, sometimes you need to open several terminal in 1 profile. By default, if you want to open several terminal, you need to open another profile (create another tab).



In Linux, we do have a software called Terminator. In my Fedora's days, Terminal is my immediate replacement for Fedora default terminal. In Mac, we do have a software which behave like Terminator which is iTerm2.



Some of the iTerm2 features are:

  • Split Panes
  • Hotkey Window
  • Search
  • Autocomplete
  • Mouseless Copy
  • Paste History
  • Instant Replay
  • Configurability
  • Full Screen


The best part of iTerm2 is you can configure your own shortcuts such as keyboard shortcut for split tab vertically, horizontally etc.

I personally think that for heavy terminal user should use iTerm2 as a direct replacement for default terminal :)




You can download it here http://code.google.com/p/iterm2/downloads/list

09 June 2011

Mac OS X | Handle multiple .zip or . rar files with CLI


For now, after 2 days of Mac OS X, I still not found my way through handling extracting multiple .zip or .rar files. However, with Fedora, we have "unrar" and "zip" to handle those files. Sweet reminiscence lead me to setup "unrar" on this new toy.

Steps for rar files:
1. Download RAR 4.01 for Mac OS X
2. Extract the above file to preferred directory. Refer below pic.


3. To install "rar" and "unrar", do the following

sudo install -c -o $USER unrar /bin
sudo install -c -o $USER rar /bin


4. To extract (without quote - refer man or help):
unrar e "files"

5.Done

Steps for zip files:
Assume you have lot of files to be extracted like the picture below, it would be time consuming to "click click click" or wtv to extract those files.



1. Extract all those files to "extract" (can be anything though) by :
unzip -jo cr-1od0\*.zip -d extract/

2. Refer help for "-jo" and the rest of modifier.
3.Done?



*please ignore the name of the files above :P

08 August 2010

yum update | bypass download limit

It is not a trick or hack anyway, it just another method of how to install or yum update several packages which is more than downloadable size due to proxy or anything.

So, in my case, I believe my download limit is 47Mb in UTP. So, the package of the openoffice.org-core is 87Mb. So, there is now way to update the package via yum update.

I can't update openoffice.org because the -core package must be download first.

What I do is, I download openoffice.org-core ONLY via download manager. Then, we will instruct yum to use openoffice.org-core which we download then update anything else via the command.

yum localinstall openoffice.org-core-3.2.0-12.25.fc13.i686.rpm


Done.

:)

12 August 2009

Sorting by column using awk

Awk is an powerful command language that allows the user to manipulate files containing columns of data and strings. Awk is extremely useful, both for general operation of Unix commands, and for data reduction (e.g. IRAF).

After using copy and paste method (why I dun think about awk before?) to sort my data, I remember in my Fedora days by using, awk,sed,grep etc.

As you can see, I only want the group of numbers which in red line box. How do I do that? Awk.
awk avaiable straight away from your terminal for Unix or gawk for Win.

Example, in your terminal (I'm using cygwin) :

awk '/Z/ { print $5 } [file name] > output.txt

/Z/ -> Find line only contain Z

print $5 -> Print 5th column

[file name] -> input file without []

> -> extract to. In this case, extract to output.txt

Result,




You can refer here for more example.

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More