Sponsored Content
Top Forums Shell Programming and Scripting Delete all injected code recursively Post 302300544 by ISOcrates on Tuesday 24th of March 2009 11:14:50 AM
Old 03-24-2009
Worked perfectly, thank you!

Quote:
Originally Posted by rubin
I assume you're using GNU sed ( I see -i option ) ... see if this helps:

Code:
find . -type f -exec sed -ri 's!<\?php /\*\*/.*\)\); \?>!!g' {} \;

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

delete files older than 5 minutes in directory (recursively)

sorry guys can some please give me a hint how to achieve this in a slick oneliner? delete files older than 5 minutes in specified directory (recursively) peace (3 Replies)
Discussion started by: scarfake
3 Replies

2. Shell Programming and Scripting

delete files recursively in the specified directory

I have to write a shell script which can delete all the files and directories recursively inside the specified directory but should not delete the specified directory. Please some body help me in writing the script. (3 Replies)
Discussion started by: deepthi.s
3 Replies

3. Shell Programming and Scripting

recursively delete the text between 2 strings from a file

i have 200000bytes size of a unix file i need to delete some text between two strings recursively using a loop with sed or awk . these two strings are : 1st string getting from a file :::2 nd string is fi...its constant . can anyone help me sed -n'/<1 st string >/,/fi/' <input_filename> is the... (2 Replies)
Discussion started by: santosh1234
2 Replies

4. Shell Programming and Scripting

Help with Find/Replace Javascript Injected Strings in mulitple files

Hi, guys, I'm not a high-end programmer, but I've been trying to write a script to remove all of the b.rtbn2.cn (and b.adserv.cn and any future variation) injected script tags on the server. (Still working on security fixes to prevent it in the future, just need to clean up now.) My approach is... (1 Reply)
Discussion started by: zzlegs
1 Replies

5. UNIX for Dummies Questions & Answers

Delete files Recursively *thumbs*.jpg

Greetings, I need to delete all files that contain the word thumbs. Those files are spread all throughout sub-directories in a file directory tree. Is there a script or single line command that will find all files with the word thumbs, and simply delete the file? For example: Delete... (4 Replies)
Discussion started by: ..Chris..
4 Replies

6. UNIX for Dummies Questions & Answers

delete recursively contents of folders

hi, I've a folder structure like : /home/project/LIBNAMEA/FILE1 /home/project/LIBNAMED/FILE2 /home/project/LIBNAMEC/FILE3 /home/project/LIBNAMED/FILE4 /home/project/LIBNAMEX/FILE5 (there is no relation in the letters after the project/ ) and i need to delete the files keeping... (5 Replies)
Discussion started by: jtmartins
5 Replies

7. UNIX for Advanced & Expert Users

Recursively delete only specified directories with given pattern

Hi All, We have a requirement to recursively delete the directories and its subdirectories older than 60 days based on timestamp (folder creation timestamp)under certain directory. However it has some specific requirements. The directories will continue to be there upto any depth. the... (0 Replies)
Discussion started by: rcvasu
0 Replies

8. Shell Programming and Scripting

Decompress (with gunzip) recursively, but do not delete original gz file

Hi all, I have a folder hierarchy with many gz files in them. I would like to recursively decompress them, but keep the original files. I would also like to move all the decompressed files (these are very large HDF5 files with .CP12 extension) to another data folder. Currently I am using four... (3 Replies)
Discussion started by: gansvv
3 Replies

9. UNIX for Advanced & Expert Users

Delete empty directories recursively - HP-UX

Hi, I want to delete all empty directories in a long directore tree structure. I want to use that from a script that will run on HP-UX 11. My definition of empty directory is that there is no regular file under it and directly beneath it. To elaborate, I have below directories. /app/dev/java... (14 Replies)
Discussion started by: asutoshch
14 Replies

10. Shell Programming and Scripting

recursively going through folders and subdirectorys and running delete from crontab

Hio, So I have a crontab delete of older files setup. This script works fine if I run them by each individual directory. Problem is there are so many thousands of files and hundreds of directories and sub directories that I need to recursively have it go through and delete files by directory... (2 Replies)
Discussion started by: vsekvsek
2 Replies
stash_cache(3snmp)						     net-snmp							stash_cache(3snmp)

NAME
stash_cache - Automatically caches data for certain handlers. Functions netsnmp_stash_cache_info * netsnmp_get_new_stash_cache (void) netsnmp_mib_handler * netsnmp_get_timed_bare_stash_cache_handler (int timeout, oid *rootoid, size_t rootoid_len) returns a stash_cache handler that can be injected into a given handler chain (with the specified timeout and root OID values), but *only* if that handler chain explicitly supports stash cache processing. netsnmp_mib_handler * netsnmp_get_bare_stash_cache_handler (void) returns a single stash_cache handler that can be injected into a given handler chain (with a fixed timeout), but *only* if that handler chain explicitly supports stash cache processing. netsnmp_mib_handler * netsnmp_get_stash_cache_handler (void) returns a stash_cache handler sub-chain that can be injected into a given (arbitrary) handler chain, using a fixed cache timeout. netsnmp_mib_handler * netsnmp_get_timed_stash_cache_handler (int timeout, oid *rootoid, size_t rootoid_len) returns a stash_cache handler sub-chain that can be injected into a given (arbitrary) handler chain, using a configurable cache timeout. netsnmp_oid_stash_node ** netsnmp_extract_stash_cache (netsnmp_agent_request_info *reqinfo) extracts a pointer to the stash_cache info from the reqinfo structure. int netsnmp_stash_cache_helper (netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) int _netsnmp_stash_cache_load (netsnmp_cache *cache, void *magic) updates a given cache depending on whether it needs to or not. void _netsnmp_stash_cache_free (netsnmp_cache *cache, void *magic) void netsnmp_init_stash_cache_helper (void) initializes the stash_cache helper which then registers a stash_cache handler as a run-time injectable handler for configuration file use. Detailed Description Automatically caches data for certain handlers. This handler caches data in an optimized way which may aleviate the need for the lower level handlers to perform as much optimization. Specifically, somewhere in the lower level handlers must be a handler that supports the MODE_GET_STASH operation. Note that the table_iterator helper supports this. Function Documentation int _netsnmp_stash_cache_load (netsnmp_cache * cache, void * magic) updates a given cache depending on whether it needs to or not. Definition at line 195 of file stash_cache.c. netsnmp_oid_stash_node** netsnmp_extract_stash_cache (netsnmp_agent_request_info * reqinfo) extracts a pointer to the stash_cache info from the reqinfo structure. Definition at line 113 of file stash_cache.c. netsnmp_mib_handler* netsnmp_get_bare_stash_cache_handler (void) returns a single stash_cache handler that can be injected into a given handler chain (with a fixed timeout), but *only* if that handler chain explicitly supports stash cache processing. Definition at line 79 of file stash_cache.c. netsnmp_mib_handler* netsnmp_get_stash_cache_handler (void) returns a stash_cache handler sub-chain that can be injected into a given (arbitrary) handler chain, using a fixed cache timeout. Definition at line 88 of file stash_cache.c. netsnmp_mib_handler* netsnmp_get_timed_bare_stash_cache_handler (int timeout, oid * rootoid, size_t rootoid_len) returns a stash_cache handler that can be injected into a given handler chain (with the specified timeout and root OID values), but *only* if that handler chain explicitly supports stash cache processing. Definition at line 44 of file stash_cache.c. netsnmp_mib_handler* netsnmp_get_timed_stash_cache_handler (int timeout, oid * rootoid, size_t rootoid_len) returns a stash_cache handler sub-chain that can be injected into a given (arbitrary) handler chain, using a configurable cache timeout. Definition at line 101 of file stash_cache.c. void netsnmp_init_stash_cache_helper (void) initializes the stash_cache helper which then registers a stash_cache handler as a run-time injectable handler for configuration file use. Definition at line 238 of file stash_cache.c. Author Generated automatically by Doxygen for net-snmp from the source code. Version 5.4.3.pre1 23 May 2010 stash_cache(3snmp)
All times are GMT -4. The time now is 08:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy