Technical Articles

Linux Find Replace in Multiple Files Using grep and sed

Here is a quick tip if you need to recursively grep a directory for files containing a certain string and replace the entire line containing that string here's one way to accomplish that.


grep -lr wngzhxknyp * | xargs sed -i 's/.*wngzhxknyp.*/<?php/'


The -lr switches make grep searche the current directory recursively (the -r) and only returns the filenames (the -l) that contain the matching string "wngzhxknyp". When we pipe the resulting filenames to sed we use sed to search and replace any lines containing "wngzhxknyp" with "<?php".

Wordpress Site Security

Wordpress Site Security


Wordpress site security should be number one priority if you're running or hosting wordpress sites. Recently there has been an overwhelming amount of reports to large hosting companies like HostGator, LiquidWeb and InMotion that wordpress site security is a large target right now for hackers. We've come up with some tried and true methods of securing your wordpress site to avoid being hacked. While these methods won't guarantee anything they will certainly reduce the risk of possibilities. 


What hackers are doing is creating what are called botnets. When a hacker gains access to a system they infect it with an application that allows them full access to the system. These botnets can be comprised of 90,000+ systems and hackers use these botnets to attack other systems, such as your wordpress site,  by using what is called a "brute force attack". A brute force attack is where hackers run a program on your site that tries to login, over and over, with hundreds of thousands of login and password combinations starting with the most common combinations first. Since the botnets come from so many different systems, it's impossible to block them completely but what you can do is tighten up security and make it more difficult for them to gain access.


How to bulk remove white background from a picture

How to bulk remove white background from a picture

To remove a white background from multiple images at the same time you can use the ImageMagick convert command which is a command line utility. You can install ImageMagick on any platform (ie... Windows, Mac, Linux, iOS) and open a command prompt to run the following command to convert multiple images in a directory to a transparent background from another solid color. For this example we're converting .jpg files to .png files and going from a white background to a transparent background but you can change the command line below to fit your needs:

Boise Web Design

Established in the City of Trees in Boise Idaho in 2002, Vector Network Solutions is now a leading web development company providing Boise web design with over ten years of experience. Leading the way with a proven track record on the industries top web platforms, VectorNS is capable of delivering exceptional solutions to clients around the globe. Our strategic methods afford us the ability to provide Boise with web design, development and a sharp competitive edge. Call or e-mail today to start initiating your project with the experienced professionals at VectorNS.

Free Web Tips & Ideas!

Sign up for VectorNS Web Tips and recieve occasional tips & ideas to enhance your web presence.