Halaman

Imam Ali Ibn Abi Thalib as

Barangsiapa yang rindu kepada surga, dia akan berpaling dari tuntutan hawa nafsunya.
Barangsiapa yang takut api neraka, dia akan menjauhi hal-hal yang terlarang.
Barangsiapa yang zuhud (tidak rakus) terhadap dunia, dia akan menganggap ringan suatu musibah
Barangsiapa yang bersiap-siap menghadapi kematian, dia akan bersegera melakukan kebaikan

Search




Showing posts with label Unix. Show all posts
Showing posts with label Unix. Show all posts

Wednesday, November 7, 2007

UNIX - Search and Replace in vi editor

This is about as complicated as it gets in vi, since search and replace sytnax is taken from the UNIX sed (stream editor) command.

>> Global search and replace --> :1,$ s/old/new/g

In english, this means:
From 1 to $ (end of file)
substitute
occurrences of "old"
with occurrences of "new"
globally (i.e., all instances of "old")

I won't go into details on using sed in this section (see the UNIX sections on sed and regular expressions), but you can easily change the range to search and replace from by changing "1" and "$" to your needs.

Wednesday, March 8, 2006

UNIX - tar files with pattern

UNIX : tar files with pattern

tar xvf /dev/rmt/0 `tar tf /dev/rmt/0 grep 'pattern'`

example:
tar xvf /dev/rmt/0 `tar tf /dev/rmt/0 grep 'DT.040306.TM.180323'`

Monday, December 12, 2005

UNIX - zip

UNIX : zip

inside directory
zip -R [zipfileneame] [files]

> cd /dump
> zip -R dump.zip cycle1*

Above command will create a zip file named dump.zip.

Subscribe

Enter your email address:

Delivered by FeedBurner