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

Mycroft AI Intelligent Personal Assistant Now Available as a Raspberry Pi Image

It's been very quiet lately for the Mycroft project, an open-source initiative to bring a full-featured intelligent personal assistant to Linux desktops, but it looks like it's still alive and kicking, and it's now available as a Raspberry Pi image. Read more

You Can Now Have All the Essential Ubuntu 14.04.5 LTS Flavors on a Single ISO

After informing Softpedia about the release of the Linux AIO Ubuntu 16.10 Live DVDs, Željko Popivoda from the Linux AIO team is now announcing the availability of Linux AIO Ubuntu 14.04.5. Read more

Benchmarking Radeon Open Compute ROCm 1.4 OpenCL

Last month with AMD/GPUOpen's ROCm 1.4 release they delivered on OpenCL support, albeit for this initial release all of the code is not yet open-source. I tried out ROCm 1.4 with the currently supported GPUs to see how the OpenCL performance compares to just using the AMDGPU-PRO OpenCL implementation. Read more

Canonical to Remove Old Unity 7 Scopes from Ubuntu Because They're Not Secure

Canonical's Will Cooke has revealed recently the company's plans on removing some old, unmaintained Unity 7 Scopes from the Ubuntu Linux archives because they could threaten the security of the entire operating system. Read more