Control content of file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Control content of file
# 1  
Old 02-05-2011
Control content of file

I want to control content of my mounted flash card which have string like "kernel32.dll". I explore some virus files have content of "kernel32". I find those files and rename this files.By shell programming. Not files name kernel32.dll. File include string like "kernel32.dll". Help me please
# 2  
Old 02-06-2011
Do you mean to say renaming "kernel32.dll" files?
Please explain clearly; better if you give example.
# 3  
Old 02-06-2011
Code:
find /DIR -type f -exec grep -l kernel32 {} \; |xargs -i mv {} {}.bak

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to remove exisiting file content from a file and have to append new file content?

hi all, i had the below script x=`cat input.txt |wc -1` awk 'NR>1 && NR<'$x' ' input.txt > output.txt by using above script i am able to remove the head and tail part from the input file and able to append the output to the output.txt but if i run it for second time the output is... (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies

2. Shell Programming and Scripting

Read a control file

Hi I have the below .sh script which receives a argument ftpClient=$1 . This argument i am trying to read from a control file called ftpProperties.control. Based on the argument input(client_ftx OR client_ptm),the script shall read the particular entries from the control file like ftp... (7 Replies)
Discussion started by: samrat dutta
7 Replies

3. Shell Programming and Scripting

Sed: replace content from file with the content from file

Hi, I am having trouble while using 'sed' with reading files. Please help. I have 3 files. File A, file B and file C. I want to find content of file B in file A and replace it by content in file C. Thanks a lot!! Here is a sample of my question. e.g. (file A: a.txt; file B: b.txt; file... (3 Replies)
Discussion started by: dirkaulo
3 Replies

4. Shell Programming and Scripting

Check whether file is processed in a control file list

I've a list of files which got processed in Target table A and stored in a control file(list of control files). I've want to trigger another process (later) based on this list of files and load into Target table B and continue running this process until this file list is exhuasted. How do I come... (1 Reply)
Discussion started by: manojg9
1 Replies

5. Shell Programming and Scripting

Formatting file data to another file (control character related)

I have to write a program to read data from files and then format into another file. However, I face a strange problem related to control character that I can't understand and solve. The source file is compose of many lines with such format: T_NAME|P_NAME|P_CODE|DOCUMENT_PATH|REG_DATE ... (3 Replies)
Discussion started by: hk6279
3 Replies

6. Shell Programming and Scripting

Control and monitoring file

Hi guys today i have new situation to resolve. I need to create a script that the first part it's already done but the problem appear when i run other sart_script inside of it. i need to check a log file until it stop after run the star script when the log file stop write, then make a copy file... (1 Reply)
Discussion started by: Newer
1 Replies

7. Shell Programming and Scripting

generation of control file

Hi, I wanted to create a control file with data in it. Also wanted to append more points like 1)Row count, then print the first field 2)first line of the file 3)last line of the file I started with this:- ls -ltr *.*| awk ' { print $9 "|" $7 $6 $8 "|" $5 } ' sed -n '1p'; sed -n '$p'; ... (2 Replies)
Discussion started by: alokbaba
2 Replies

8. Shell Programming and Scripting

Control file

if TERM has the value vt220, where will you expect to find its control file (0 Replies)
Discussion started by: thelakbe
0 Replies

9. AIX

Full control on File

Guy's There is file in AIX called applog related to application and it's owned by root:system I want normal user called appuser to mange this file without change the file owner and without add the appuser in root group Is there any way to give this user appuser full Control in that file applog ?... (8 Replies)
Discussion started by: ITHelper
8 Replies

10. Shell Programming and Scripting

Checking for a control file before processing a data file

Hi All, I am very new to Shell scripting... I got a requirement. I will have few text files(data files) in a particular directory. they will be with .txt extension. With same name, but with a different extension control files also will be there. For example, Sample_20081001.txt is the data... (4 Replies)
Discussion started by: purna.cherukuri
4 Replies
Login or Register to Ask a Question