Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Command to find files and update
Name: GigabitTech Date: December 26, 2007 at 20:30:49 Pacific OS: Linux (CentOS) CPU/Ram: Pentium-3 1GB Product: Intel
Comment:
I'm a new-be in Linux I want to be able to update/overwrite all files named 'test.txt' in a directory(and its subdirectory) with a particular text, say 'information'. The files named test must be searched recursively within the directory as they may be present in any of the sub-directories.
Would be glad if anyone tell me a command for this.
Name: jefro Date: December 27, 2007 at 12:17:03 Pacific
Reply:
There is not one command. You would need to use various commands either in a script(batch file) or on a single line that takes the output from one function to the input of the next.
There are many ways to do it. They all would involve some form of what you asked it to do.
Search files by name, recursive. (some people put files listed in a new file to use as second part of input) Take those files and search for text string. Replace string with new string..
See the man pages on functions and put together a plan. I think you can do it.
I read it wrong and answer it wrong too. So get off my case you peanut.
0
Response Number 2
Name: nails Date: December 28, 2007 at 14:51:30 Pacific
Summary: What is the command to find out what shell I am running. I am setting up Java development kit from Sun and need to set the path, I need to edit "****" file and add the path to the bin directory. But ...
Summary: There's a script called binstats (google is your friend) which is very useful for overall statistics but you'd need to modify it or give it the debug option and then sort through the temporary files i...
Summary: Hi all folks, Kindly advise What other commands shall be used to find the directory and subdirectories of an application other than "locate" command Thanks in advance. satimis ...