SysAdmin Blog, TechTips and Reviews

An (ex) System Administrator's Blog



Archives Posts

How Do you Find and Replace Expressions in VI Editor

February 29th, 2012 by elizar

One and for all, let’s do this again.. how do you do the find and replace function of the Vi editor? I keep on coming back to Google for the syntax but at least I know that there is an ‘s’ in the beginning of the command and a ‘g’ at the end (for Global search). :)

Anyway, a little background before i copy paste the information here. I first taught myself how to use Vi during my ‘first’ job as a systems engineer in NEC TNCSi. Actually, my UNix foundation was all from NEC. Not that they train me how to be a unix admin, but I learned and taught myself how to do it. I read books that were lying around there and build samba servers, qmail and email servers and stuff until I got the ropes, the ins and outs of the UNix environment (Actually, I was using Linux – Redhat).

How Do You Find and Replace Text in Vi?

To perform a global search and replace in vi, use the search and replace command in command mode:

:%s/search_string/replacement_string/g

The % is a shortcut that tells vi to search all lines of the file for search_string and change it to replacement_string. The global ( g ) flag at the end of the command tells vi to continue searching for other occurrences of search_string . To confirm each replacement, add the confirm ( c ) flag after the global flag.

For this latest usage, i need to change the shell for all the users who are using /bin/ksh to a safeword sid shell.

remember to use the ‘slash’ character if you are filtering actually backslash.. You do not want to misinterpret the ‘/’ character by vi.

so, that’s

:%s/\/bin\/ksh/\/bin\/sid/g

Filed under Commands, Linux, Solaris, Unix having No Comments »

Archives Posts

Gnome 3.4 Beta 1 – What’s Up?

February 27th, 2012 by elizar

I could not remember the first time I ever used the first ever desktop environment in the Linux OS.

Back in the pre- Fedora dys when Redhat was still freely available, two well known desktop available to linus was the K Desktop and Gnome.

I am in love with Gnome then and I beilive ot is still the one i prefer today, even though I an no longer active in the Linux community.. Solaris grab all my attention.

Now, Gnome 3.4 Beta 1 is almost out…

The GNOME 3.4 Beta 1 release is ready for testing and it brings updates to main components, such as GNOME Contacts, GNOME Control Center, GNOME Desktop, GNOME Disk Utility, GNOME Panel, GNOME Screensaver, GNOME Session, GNOME Settings Daemon, GNOME Shell, GNOME System Monitor, GNOME Themes Standard, Mousetweaks, and GNOME User Docs.
Moreover, the following apps were updated: NetworkManager (including network-manager-applet), Baobab, Empathy, Evince, Yelp, Nautilus, and Eye of GNOME.

The GNOME 3.4 Beta 1 release is ready for testing and it brings updates to main components, such as GNOME Contacts, GNOME Control Center, GNOME Desktop, GNOME Disk Utility, GNOME Panel, GNOME Screensaver, GNOME Session, GNOME Settings Daemon, GNOME Shell, GNOME System Monitor, GNOME Themes Standard, Mousetweaks, and GNOME User Docs.

Moreover, the following apps were updated: NetworkManager (including network-manager-applet), Baobab, Empathy, Evince, Yelp, Nautilus, and Eye of GNOME.

Last but not least, here are the core libraries that were updated in GNOME 3.4 Beta 1: at-spi2-atk, at-spi2-core, clutter, clutter-gst, cogl, folks, glib, glibmm, gmime, gstreamer, gtk+, gtksourceview, libcroco, libgee, libgnomekbd, libsoup, mutter, and pygobject.

The GNOME 3.4 development cycle will continue with a second Beta release on March 7th and the GNOME 3.4 Release Candidate version on March 21st.

The final release of GNOME 3.4 will be available on March 28th, 2012, followed by the first point release on April 18th, GNOME 3.4.1.

Filed under Linux having No Comments »

Archives Posts

java script mouse click change image – saving for future use

February 13th, 2012 by elizar

I want this to be added on my Make money online blog later

Filed under Uncategorized having No Comments »

I was here...