Vim Trick: Replace One String with Another

These 3 vim tricks are very usefull when you need to replace strings in text files. 1. This “vim command” replaces string1 with string2 :s/string1/string2/ only in the first string1 match, on the current line. [Esc]:s/string1/string2/ 2. This replaces string1

ViM trick: Split Screen in the Vim text browser

In this article I will show you how to split the screen in ViM. I have tested this tricks with vim 7.3. Find your vim version: $ vim –version | head -1 VIM – Vi IMproved 7.3 (2010 Aug 15,

The Linux Yes Command

I do not find the Linux yes command useless. Combined in a piped command can be usefull. $ yes y y y^C It can be used for tasks that need confirmation: $ yes | sudo apt-get install skype Do you

Open a file or directory from the terminal

There are a few tools that open a file or a directory from the terminal. This commands can be very usefull and easy to use, if you alias them. gnome-open /path/to/file_or_dir xdg-open /path/to/file_or_dir okular /path/to/file_or>dir Because okular belongs to KDE

How to Find Your Computer Hardware Information

Finding the Computer Hardware Information is quite easy in Linux systems. The Linux system offers us quite a lot of tools for finding out the hardware configuration. You can find the CPU information by reading the /proc/cpuinfo file. The /proc/cpuinfo

Share PATH, aliases and functions between Bash and Zsh

Sharing the aliases, customized PS1 (prompt), functions and PATH/CDPATH between the zsh and bash shells is very usefull. To my mind, the cleanest way to do this is to create a new file, having the portable shell settings stored there

The Linux and Unix Basename and Dirname Commands with Examples

The Linux and Unix basename command is usefull in some shell scripts. The basename command prints the final component in the file path. It can remove the file extension, and displays only the filename (without extension). Example of how the

15 Basic Commands Every Linux and Unix User Should Know How to Use

In this article I will show you 20 commands every Linux and Unix users should know how to use. The order of this commands is random. Probably ls and cd are the most used Linux and Unix commands. 1. ls <list>

Create users by hand in Linux and Unix

It is usefull to know how to create users by hand in Linux and Unix. Not only because you undestand what the useradd command does in background, but also because you may not want to learn how to use the

Support LinuxG via Patreon
Support LinuxG.net on Patreon!
Subscribe

  

Subscribe to get the latest Linux news and how to guides directly on your e-mail!