The Baeldung logo
  • The Baeldung LogoLinux Sublogo
  • Start Here
  • Write for Baeldung
  • About ▼▲
    • Full Archive

      The high level overview of all the articles on the site.

    • About Baeldung

      About Baeldung.

Category upFiles

File Editing

Editing files is a common task of any novice or advanced user on the system. Learn about some of the common commands used to edit files using various examples.

  • sed (27)
  • awk (23)
  • vim (23)
  • vi (11)
  • cat (9)
  • head (6)
  • echo (6)
  • tr (5)
  • tail (5)
  • perl (4)
  • tee (4)
  • printf (4)
  • find (4)
  • grep (4)
  • ffmpeg (3)
  • file (3)
  • lsof (2)
  • copy-edit (2)
  • truncate (2)
  • rename (2)
  • split (2)
  • mv (2)
  • sort (2)
  • cut (2)
  • reference (2)

>> The Differences Between BRE, ERE, and PCRE Syntax in Linux

>> Appending Text to a File Without Using I/O Redirection

>> Insert Newline without Leaving Normal Mode in Vim

>> Insert Text at the End of a Group of Lines Using Vim

>> How to Embed Subtitles into a Video Using FFmpeg

>> Replacing Specific Line With a String Variable in Shell

>> Displaying Tabs as Characters in Vim

>> Saving and Restoring Vim Sessions

>> How to Split a Text File Based on a Regular Expression

>> Add Indentation and Guides to Vim’s Edit View

>> Force Edit and Save of Opened File Without Permissions in Vi

>> Changing Indentation Size in Vi

>> Vi Automatic Commands and Reloading the Current File Contents

>> Determine if a File Write Is in Progress

>> Editing MP3 Tags on Linux

>> Setup a Ruler on a Specific Column in Vim

>> Stripping Leading and Trailing Whitespaces From All Lines in a File in Vim

>> Efficiently Editing HTML/XML Files in Vim

>> Indenting and Turning Off Auto Indent When Pasting Text Into Vi

>> Autocompletion Support in Vim

>> Installing Vim/NeoVim Plugins

>> Editing Multiple Files in Vim

>> Select All Contents in a File Inside Vim

>> How to Create a Random Human-Readable Text File in Linux

>> Find and Remove Large Files That Are Open but Have Been Deleted

>> How to Replace the Nth Occurrence of a String Using sed

>> Show Special Characters in Linux with less

>> Share Config Between Vim and Neovim

>> How to Automate HTML-to-PDF Conversions

>> How is NeoVim Different From Vim?

>> Convert Binary Data to Hexadecimal

>> Processing YAML Content With yq

>> Concatenating Videos Using FFmpeg

>> Write to a Text File in Bash

>> Adding a Column of Values in a Tab Delimited File in Linux

>> Search and Replace in Vim

>> Differences Between vi and vim Editors

>> Quickly Clear the Contents of a File in Linux

>> Save a File in Vim

>> Find Matching Text and Replace the Next Line

>> Difference Between awk, nawk, gawk and mawk

>> Comparing Words in Two Files in Linux

>> Removing a Trailing Newline From a File

>> Delete Selected Text in the Vi Editor

>> Renaming All Folders and Files to Lowercase in Linux

>> xmllint in Linux

>> Merge PDF Files in Bash

>> How to Write Bash Variable Contents to a File

>> Text Objects in Vim

>> Pasting Text in Vim

>> How to Edit Binary Files on Linux

>> How to Add a String After Each Line in a File in Linux

>> Insert a Line With Spaces Using sed

>> Removing the Last Character of a File

>> Merge Two Files Line By Line in Linux

>> Insert Multiple Lines Into a File After a Specified Pattern

>> Split a File With the Header Line

>> Concatenation of Multiple Gzip Files

>> Remove All Whitespace Characters From a Text File

>> Replacing Spaces from Filenames in Linux

>> Run vi Editor Inside Docker Container

>> Cutting Videos Based on Start and End Time using FFmpeg

>> Delete All Lines in a File Starting From a Specific Line

>> Replace String in a Large One Line, Text File in Linux

>> Delete Empty Files and Directories in Linux

>> Manipulating Images With ImageMagick Command-Line Tools

>> Remove the Last Character From Each Line in Linux

>> sed Substitution With Variables

>> Remove the First Line of a Text File in Linux

>> Using Vim Registers

>> How to Remove the Lines Which Appear in File B From Another File A in Linux

>> Remove the Last N Lines of a File in Linux

>> Splitting a File at Given Line Numbers

>> How to Insert a Line at Specific Line Number

>> Remove Line Endings From a File

>> Recursive Search and Replace in Text Files

>> Using sed to Replace a Multi-Line String

>> Linux Commands – Remove All Text After X

>> Empty the Contents of a File

>> Delete Lines in a Text File That Contain a Specific String

>> How to Reverse the Order of Lines in a File in Linux

>> Remove Blank Lines From a File

>> Guide to the vi Editor

>> The head and tail commands in LINUX

>> How to Find and Replace Text in a File

>> Modify Files in Linux using vi, nano or emacs

>> Linux Commands for Appending Multiple Lines to a File

>> Guide to Useful File Manipulation Commands

>> Splitting Files in Unix Systems

>> Append Lines to a File in Linux

  • ↑ Back to Top
The Baeldung logo

Categories

  • Administration
  • Files
  • Filesystems
  • Installation
  • Networking
  • Processes
  • Scripting
  • Search
  • Security
  • Web

Series

  • Linux Administration
  • Linux Files
  • Linux Processes

About

  • About Baeldung
  • The Full Archive
  • Write for Baeldung
  • Editors
  • Terms of Service
  • Privacy Policy
  • Company Info
  • Contact
The Baeldung Logo