• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
sharadchhetri

sharadchhetri

AI, Linux, Cloud and DevOps

  • Home
  • Resources
    • Learn Linux
    • Articles
  • My Projects & Work
    • My Nagios Plugin
    • My Dockerhub Repo
    • My WordPress plugins
    • My Github Repos
  • Facebook Page
  • Contact
  • Privacy Policy
  • About Me

vi

vi / vim : Remove space at beginning and end of each lines

November 3, 2015 by Sharad Chhetri 1 Comment

vim

In this article, we will learn in vi / vim editor how can we remove all the spaces at the beginning or end of the file. Recently, we have encountered the problem where contents where copied from one file to another file with new file extension. There we found too many uneven spaces in each line at beginning and end.

Filed Under: Articles Tagged With: vi

vi : Edit file without opening it

July 6, 2014 by Sharad Chhetri 7 Comments

In this post I am sharing the trick to edit file without opening it. To achieve this task we will use vi editor. vi is very well known,popular,ultimate and awesome editor and by default available in all Unix/Linux operating system. Syntax: vi -c ‘COMMAND|wq’ /path/of/file Example: We will replace a keyword with new keyword in […]

Filed Under: Articles, Linux Commands Tagged With: linux command, vi

set and unset line number in file with vi editor

November 18, 2013 by Sharad Chhetri Leave a Comment

In this tutorial we will learn, set and unset line number in file with vi editor. The same is applicable to vim editor also.(vim is advanced vi editor).vi editor is one of the famous and bydefault file editor in many linux distro. In vi editor you can use regex tricks. To set line number in […]

Filed Under: Tips And Tricks Tagged With: vi, vim

Primary Sidebar

Articles

  • Install n8n docker in Ubuntu for practicing
  • Bash Script: MySQL Database backup to AWS S3
  • Automate no touch Jenkins setup wizard on docker (jcac)
  • How to run and configure Jenkins in Docker container
  • Complete Guide: How to install Nagios Monitoring on AlmaLinux / Rocky Linux
  • Install KVM on Ubuntu 24.04 LTS ( Bash Script )
  • How to install GIMP 2.10 on Ubuntu / Debian
  • 5 ways to check Ubuntu version of system (commands and GUI)
  • How To Solve Forgot MySQL / MariaDB Root Password
  • Create Self Hosted Build Agent Docker Image for Azure DevOps

Copyright © 2026 ยท
The material in this site cannot be republished either online or offline, without our permission.
Proudly Blogging From India.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy