MR.OMAR on January 4th, 2010

The situation is you have a number of files with sequence filenames, and you would like to rename it, for example you would like to rename from photos01a.jpg to photos01.jpg, yes, it just a simple removing the ‘a’ from it, but it would be an annoying jobs if the number of files is quite big.

Read the rest of this entry »

Tags: , , ,

MR.OMAR on January 4th, 2010

sed stand for Stream EDitor. It is more to ascii text manipulation, but this time while it’s from the command line instead of in the text editor like vi. The replace command looks exactly as the vi editor replace command.

Read the rest of this entry »

Tags: , , ,

MR.OMAR on January 4th, 2010

Been long time since I used this command, only today I had a chance to try it again, and to my surprise it still works ! Previously I use this under SUN Solaris unix, it still works when I tested it on FreeBSD 5.x.

Read the rest of this entry »

Tags: , , ,

MR.OMAR on January 4th, 2010

In windows environment you will just have to open the search window, input what you want to search/find and then click the search button. In unix/linux environment, if you’re using the X windows system, you might have that capability, but for a faster action, I always prefer the terminal/shell prompt.

Read the rest of this entry »

Tags: , , ,

MR.OMAR on January 4th, 2010

Links is a way to replicate a file and share it with other users (of course with a proper permission applied). Any changes made to any of the link files, all will be affected. This was used last time during software programming development on unix (and yes that will be >10 years ago, vi is the best editor and cobol was widely used).

Read the rest of this entry »

Tags: , , ,

MR.OMAR on January 4th, 2010

Another looping command that you can use in command prompt is while loop. Used to be my favourite while waiting for some process to finish – usage to monitor that on-going process, as I hate waiting without knowing whats going on – eg. how much records has been transferred etc. etc.

Read the rest of this entry »

Tags: , , , ,

MR.OMAR on January 4th, 2010

Sometime when using Telnet Terminal program from Windows or from some other servers, the Backspace key will display ^H instead of deleting the previous input. Don’t really know what exactly causing this, maybe due to the terminal setting of the client Telnet program or something else (would love to hear if you do know what cause this behaviour).

Read the rest of this entry »

Tags: , ,

MR.OMAR on January 4th, 2010

This used to be the trick to hide folders in unix last time (not sure whether it’s still been used nowadays). Sometimes even the GUI file manager can’t go into the folders due to this unprintable control character.

Read the rest of this entry »

Tags: , ,

MR.OMAR on January 4th, 2010

Another useful feature in vi editor is you can specify how many times you want the command to be executed and it’s applicable to almost all the commands.

Read the rest of this entry »

Tags: , , ,

MR.OMAR on January 4th, 2010

awk is quite useful when you need to filter your output. As a start I will demonstrate a simple usage of awk.

Read the rest of this entry »

Tags: , , ,