1
vote
2answers
156 views

Deleting inserted content in multiple files on linux server

I often have problem with sites that get hacked. Usualy they end up with inserted script in different files. Is there a way, on linux, to search for this content and automaticaly delte it ? Usualy ...
2
votes
1answer
131 views

Recursively search and replace the contents of multiple file types

I have thousands of web files(*.php, *.htm, *.html, etc) that contain an absolute path(http://site.com/sites/etc). I need to scan a directory and all subdirectories for the various file types and ...
2
votes
2answers
969 views

How to use sed, perl to rename files and its contents with a particular pattern in a given directory?

Given a directory "Centos1" which has few files named Centos1.x, Centos1.y, Centos1.z and these files also has "Centos1" in their contents. Using a single command ( using find, sed, perl -pie ) how ...
1
vote
1answer
242 views

Using Find, Grep, Awk, or Sed To Rename Server After Cloning

My client tells me they have cloned a VM in VMWare of an Ubuntu Linux server. Now it's my job to get into all the files and find out what still has the old server name of "bishop" and change it to ...
21
votes
8answers
39k views

how to find out mac addresses of all machines on network

Is there some easy way to find out mac address of all machines on my network rather than doing an SSH into each and ifconfig | grep HWaddr if there are 300 machines on network I really need some easy ...
1
vote
2answers
1k views

Recursively rename files using find and sed

I want to go through a bunch of directories and rename all files that end in _test.rb to end in _spec.rb instead. It's something I've never quite figured out how to do with bash so this time I thought ...