How do I edit a file without opening it in Linux?

Hoàng Minh An

New member
How do I edit a file without opening it in Linux?
Answer
Yes, you can use ‘sed’ (the Stream EDitor) to search for any number of patterns or lines by number and replace, delete, or add to them, then write the output to a new file, after which the new file can replace the original file by renaming it to the old name.
 

Tìm kiếm

Back
Top