How to change a string in a text file on a Linux server
|
Feb 9, 2012, 10:01
Post: #1
|
|||
|
|||
|
How to change a string in a text file on a Linux server
How to change a string in a text file on a Linux server
So, you want an easy to to replace text in files, even multiple files, on a linux machine, from the command line. How? - You ask? Easy. Let me show you. Let’s say you want to replace all instances of “John” with “Pete” in a file, called resume.txt In a bash shell, run the following: Code: PHP Code: PHP Code: replace John Pete — resume.txt Code: PHP Code: PHP Code: replace /home/ /home2/ — /etc/* Code: PHP Code: PHP Code: replace mydomain newdomain — /var/named/*.db █| AvaNetco.com Hosting Company Shared Hosting , VPS , Dedicated █| 24/7 Server Management, Outsourced Support, Web Development █| High Quality virtual servers with lots of Guaranteed RAM and HDD space, Impeccable Service. |
|||
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads... | |||||
| Thread: | Author | Replies: | Views: | Last Post | |
| WINDOWS VPS v/s LINUX VPS | vedas | 1 | 103 |
May 5, 2012 09:46 Last Post: WHUK |
|
| Dedicated Server Hosting & Shared Web Hosting | Tyler Marcelo | 5 | 155 |
Mar 30, 2012 12:41 Last Post: Asher ross |
|
| Vps9.Net Netherlands Linux VPS Hosting 1Gbps @ 13€/mo. and 100Mbps @ 9€/mo | VPS9.net | 2 | 186 |
Mar 29, 2012 09:34 Last Post: b2netsolutions |
|
| Vps9.Net Russia Linux VPS Hosting 100Mbps @ 9€/ | VPS9.net | 0 | 102 |
Mar 25, 2012 14:45 Last Post: VPS9.net |
|
| WooServers: Linux Dedicated Servers for $20 - Check out Now! | ronniekwar | 3 | 382 |
Mar 24, 2012 03:36 Last Post: ranjani |
|
User(s) browsing this thread:
1 Guest(s)
1 Guest(s)




