Language Selection

English French German Italian Portuguese Spanish

Linux quicktip - find and replace from the command line using sed

Filed under
HowTos

If you’ve ever had to modify files on your Linux system and simply change a word or two, there’s a fast and simple way to do this using sed.

Say you want to change your sources.list file to go from Ubuntu 6.06 (Dapper) to 6.10 (Edgy). You can do this with a one line command using sed.

sudo sed -i ’s/dapper/edgy/g’ /etc/apt/sources.list

You’ve just replaced all of your instances of the word ‘dapper‘ with ‘edgy‘.

You can also combine the sed command with the find command for a pretty powerful find and replace.

Full Story.

More in Tux Machines

This Custom Android-x86 Build Puts Android 7.1.1 on Your PC, with Linux 4.11 RC7

GNU/Linux developer Arne Exton was happy to announce the release of a new build of his custom built Android-x86 project that lets uses runs the latest Android mobile operating system on their personal computers. Read more

Clear Linux Announces Intel Clear Containers 2.1.6 with Docker 17.04.0 Support

Clear Linux's Kent Helm was proud to announce the release and general availability of Intel Clear Containers 2.1.6, a maintenace update that promises to improve compatibility with recent Docker releases, but also adds various bug fixes. Read more

Nantes Métropole releases open source tool for LibreOffice transition

The French city of Nantes (Nantes Métropole) has released an open source tool used to schedule its migration to LibreOffice. The shift from commercial software to the free and open source LibreOffice productivity suite started in 2013 and is intended to save the administration EUR 260 000 per year. The transition was finalised in April 2016. Read more

Today in Techrights