Skip to main content

Posts

Showing posts with the label Linux

Move like a Ninja on Terminal Console

If you are in IT and do a lot of stuff on terminal, this is the post for you. In the following post, we will explore various key shortcuts to jump and edit on console. Note:- Short keys may behave differnt on differnt OS systems. These keys best work with Linux sytem, For mac OS you have to enable Option key as Meta key in case of Alt . I have never checked these on windows, Please share your experinece with windows in comments. ------------------------------------------------------------------ Edit Control Move forward one char: Ctrl + f Move backward one char: Ctrl + b Move forward one word: Alt + f Move backward one word: Alt + b Move to end: Ctrl + e #Like End Move to start: Ctrl + a #Like Home Jump toggle between current location and start: Ctrl + xx Delete forward one char: Ctrl + d #Like Delete Delete backward one char: Ctrl + h #Like Backspace Delete forward one word: Alt + d Delete backward one word: Ctrl + w Delete to end: Ctrl + k Delete to start: Ctrl + u Undo: Ct...

How to Open a File in Vim Editor without Navigating through all the nested Directories

                      O ne day I was working on something and I needed to modify the configuration file on the server. So I had to navigate to all the way through nested directories and then finally edit the file. The requirement was quite frequent and every time I had to navigate to multiple directories. This post is about to simplify the above task. For example, We need to edit the following file. File path : /home/alex/Softwares/apache-tomcat-7.0.62/webapps/live-service/WEB-INF/classes/conf/database/database.conf We can do it by using the below command: alex:~$ vim /home/alex/Softwares/apache-tomcat-7.0.62/webapps/live-service/WEB-INF/classes/conf/database/database.conf If we count the nested directories, There are 10 directories We need to navigate through and It is cumbersome even we know the exact path of the file. We will try to do something which can reduce the effo...

Installation of ns 2.35 simulator in ubuntu Linux

For installing ns 2.35 in ubuntu Linux you have download ns-allinone-2.35.tar.gz (56.7MB) and following steps. 1. Get an active internet connection and connect your computer with internet. 2. Update your computer by using command   sudo apt-get update 3. Run command  sudo apt-get install build essential autoconf automake libxmu-dev   4. If in step-3 or step-2 command give some error then you have to connect your terminal to  internet.For this you can visit url  http://askubuntu.com/questions/298177/a-failed-to-fetch-error-occurs-when-apt-get-update-is-run-how-do-i-fix-this 5.  The downloaded file is a tar file. You need to untar it. So, run command   tar zxvf ns-allinone-2.35. tar.gz . 6. Run four given commands            cd ns-allinone-2.35         ./install         cd         sudo apt-get install ns2 7. If command ...