I'm not sure your plan is the best but here is a suggestion, make a backup first even though there is garbage in there.:
If it is limited to php files (for example), then limit searching with find as step one, then use grep to see if the file is infected, and sed to remove bad strings - sed has to write to a tmp file which at the end of sed processing gets copied back and then re-set permissions/ownership.
psuedocode:
This has the potential of breaking some code. It also depends on how well you did checking for malware, it could simply reinfect your system if you missed something.
Be sure to get a good backup once the system is running correctly.
This User Gave Thanks to jim mcnamara For This Post:
Hi there,
I would like to write a script to automate the copy and renaming of files in multiple dir.
I have a generic file named s253e.prb and would like to copy this to multiple dir and rename it.
Example:
Dir is AL-M1 and the prb file name is AL-M1.prb. I would like to be able to... (6 Replies)
hi guys,
Suppose you have 100 files in a folder and you want to replace all occurances of a word say "ABCD" in those files with "DCBA", how would you do
it ???
jatin (13 Replies)
I used the following script
cd pathname
for y in `ls *`;
do sed "s/ABCD/DCBA/g" $y > temp; mv temp $y;
done
and it worked fine for finding and replacing strings with names etc. in all files of the given path.
I'm trying to replace a string which consists of path (location of file)
... (2 Replies)
I used the following script
cd pathname
for y in `ls *`;
do sed "s/ABCD/DCBA/g" $y > temp; mv temp $y;
done
and it worked fine for finding and replacing strings with names etc. in all files of the given path.
I'm trying to replace a string which consists of path (location of file)
... (11 Replies)
Hi
I use the following code to replace ‘.' with ‘N' in my files and keep both versions.
awk '{ gsub(/\./,"N"); print }' file_0001.txt > path/to/new/dir/file_0001.txt
I need help on how to apply the code to 100 files instead of doing them one file at a time. The files are labeled... (7 Replies)
Hi All,
Iam new to unix, I need to find string and replace it in the file name. Like
text_123_0.txt,text_123_1.txt,text_123_2.txt. I need to search 123 and replace it with 234 . Is there any unix command to replace them in single command since i have 5 directories. So i need to go each and every... (0 Replies)
Guys I have a big issue that I need to get fixed ASAP however I can not seem to find a way to do it. We started to use zones with Solaris 10 at work and we moved a zone from a SIT box to a DEV box. Problem is the software we have installed is looking at a /lcl/sit/apps/ path and it needs to look... (5 Replies)
Is there a reason why all of these examples of linux find and replace in multiple files use find and grep to pipe into sed or perl. Why not just use sed or perl directly with something like this?
sed -i 's/echo/burnbaby/g' booboo*... (2 Replies)
Hey guys. I know pratically 0 about Linux, so could anyone please give me instructions on how to accomplish this ?
The distro is RedHat 4.1.2 and i need to find and replace a multiple lines string in several php files across subdirectories.
So lets say im at root/dir1/dir2/ , when i execute... (12 Replies)
Hi,
I have php files in main dir and sub dir's as well.
I need to find "new mysqli('localhost', 'System', 'xxxxxx', 'System', '3306');"
and replace as "new mysqli('localhost', 'unx_sys', 'yyyy', 'unx_sys', '3306');"
I tried like:
sed 's/new mysqli\(*\)\;$/new... (1 Reply)
Discussion started by: ashokvpp
1 Replies
LEARN ABOUT DEBIAN
clmresidue
clm residue(1) USER COMMANDS clm residue(1)
NAME
clm residue - extend clustering of subgraph to clustering of graph.
clmresidue is not in actual fact a program. This manual page documents the behaviour and options of the clm program when invoked in mode
residue. The options -h, --apropos, --version, -set, --nop are accessible in all clm modes. They are described in the clm manual page.
SYNOPSIS
clm residue -icl fname (input clustering) -imx fname (input graph) [-rpm fname (residue projection matrix)] [-o fname (output clustering
file)]
DESCRIPTION
The cluster file presumably contains a clustering of a subgraph of the graph G contained by the matrix file, implying that the row domain of
that clustering is a subset of the node domain of the graph. clm residue will compute a simple upwards projection of that clustering,
resulting in a clustering of G.
OPTIONS
-imx fname (input graph)
-icl fname (input clustering)
-rpm fname (residue projection matrix)
The name for the file in which the residue projection matrix is stored. It contains for each node and for each cluster in the input clus-
tering the combined weight of the (edges to the) neighbours of that node in that cluster. The default output file name is out.rpm.
-o fname (output clustering file)
The name for the file in which the majority vote projection clustering is stored. Aka the majority vote projection clustering storage file
name.
This embodies a very crude approach to distributing the missing nodes in the input clustering onto that same cluster. For each node, the
cluster is taken for which the residue projection is the largest (see above). The residue (i.e. the set of missing nodes) is initially
viewed as a cluster; the set of nodes for which the projection is largest for the residue itself will form a new cluster, if it is not
empty.
By default output is sent to STDOUT.
AUTHOR
Stijn van Dongen.
SEE ALSO
mclfamily(7) for an overview of all the documentation and the utilities in the mcl family.
clm residue 12-068 8 Mar 2012 clm residue(1)