Sponsored Content
Top Forums UNIX for Advanced & Expert Users Full System Recursive Search for a String - Not Finishing Post 302751361 by jim mcnamara on Thursday 3rd of January 2013 08:19:14 PM
Old 01-03-2013
Code:
find / -type f -exec grep  -l foobar {} \;

You have probably hit some character special file that has a readlock on it. You don't want to read tty files anyway. This returns the names of file with the string 'foobar' in them.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Recursive Search and replace only when found string

Hello all ( again ) I will like to search and replace string in text file ok I can loop throw the files like : foreach f ( ` find . -name "*."`) .. but here I like to examine the file if in contain the desired string and so do the sed -e 's/blah/foo/g' thingy on it or there is better way... (1 Reply)
Discussion started by: umen
1 Replies

2. UNIX for Advanced & Expert Users

how to make a full system backup excluding data and restoring it to a new system

Hi, In order to have a sand box machine that I could use to test some system changes before going to production state, I'd like to duplicate a working system to a virtual one. Ideally, I'd like to manage to do it this way : - Make a full system backup excluding the user file system (this... (7 Replies)
Discussion started by: pagaille
7 Replies

3. UNIX for Dummies Questions & Answers

recursive search and ftp

Could someone help me in recursive search and ftp'ing the files to remote server? The host machine will have /dir1/dira/list_of_files1 /dir1/dirb/list_of_files2 /dir1/dirc/list_of_files3 . . . so., I need to search from dir1 recursively (only one level down) and find all the files that... (1 Reply)
Discussion started by: brahmi
1 Replies

4. UNIX for Advanced & Expert Users

Recursive search for filenames containing ..

Hi all, Since my gopher server doesn't like filenames containing 2 or more consecutive dots in a filename, I'd like to do a search for them and replace them with... well, let's say underscores... I've tried a oneliner or 2 from other posts, but they don't seem to work well with locating dots.... (3 Replies)
Discussion started by: Evert
3 Replies

5. Shell Programming and Scripting

recursive search and copy

Hello again. Well, I need help again sooner as I thought. Now I want to search for files with a known name within all subdirs, and copy the to differently named files in the same directory. For example if I had only one file to copy, I would just usecp fileName newFileNamebut to do this... (1 Reply)
Discussion started by: cabaciucia
1 Replies

6. Shell Programming and Scripting

Search several string and convert into a single line for each search string using awk command AIX?.

I need to search the file using strings "Request Type" , " Request Method" , "Response Type" and by using result set find the xml tags and convert into a single line?. below are the scenarios. Cat test Nov 10, 2012 5:17:53 AM INFO: Request Type Line 1.... (5 Replies)
Discussion started by: laknar
5 Replies

7. Shell Programming and Scripting

Recursive search for string in file with Loop condition

Hi, Need some help... I want to execute sequence commands, like below test1.sh test2.sh ...etc test1.sh file will generate log file, we need to search for 'complete' string on test1.sh file, once that condition success and then it should go to test2.sh file, each .sh scripts will take... (5 Replies)
Discussion started by: rkrish123
5 Replies

8. Shell Programming and Scripting

Recursive replacement of search string using sed

Dear Unix Forum Group Members, Please do let me know how I can replace the double pipe with single pipe recursively on single record. Sample Input Data: DN set|Call prefix||| Called number address nature 0||| *789|||||||ALL number types 0||| 00||||||||ALL number types 10||... (5 Replies)
Discussion started by: srinu.kadem
5 Replies

9. OS X (Apple)

Search recursive

before posting, I have tried to find my answer elsewhere. no luck. I need to find a file buried in a folder somewhere. Master folder has 10 sub folders. each sub folder has folders too. I found this but it does nothing I am on Mac and use Applescript. do shell script "find... (2 Replies)
Discussion started by: sbrady
2 Replies
XML::LibXML::PI(3)					User Contributed Perl Documentation					XML::LibXML::PI(3)

NAME
XML::LibXML::PI - XML::LibXML Processing Instructions SYNOPSIS
use XML::LibXML; # Only methods specific to Processing Instruction nodes are listed here, # see XML::LibXML::Node manpage for other methods $pinode->setData( $data_string ); $pinode->setData( name=>string_value [...] ); DESCRIPTION
Processing instructions are implemented with XML::LibXML with read and write access. The PI data is the PI without the PI target (as specified in XML 1.0 [17]) as a string. This string can be accessed with getData as implemented in XML::LibXML::Node. The write access is aware about the fact, that many processing instructions have attribute like data. Therefore setData() provides besides the DOM spec conform Interface to pass a set of named parameter. So the code segment my $pi = $dom->createProcessingInstruction("abc"); $pi->setData(foo=>'bar', foobar=>'foobar'); $dom->appendChild( $pi ); will result the following PI in the DOM: <?abc foo="bar" foobar="foobar"?> Which is how it is specified in the DOM specification. This three step interface creates temporary a node in perl space. This can be avoided while using the insertProcessingInstruction() method. Instead of the three calls described above, the call $dom->insertProcessingInstruction("abc",'foo="bar" foobar="foobar"'); will have the same result as above. XML::LibXML::PI's implementation of setData() documented below differs a bit from the standard version as available in XML::LibXML::Node: setData $pinode->setData( $data_string ); $pinode->setData( name=>string_value [...] ); This method allows one to change the content data of a PI. Additionally to the interface specified for DOM Level2, the method provides a named parameter interface to set the data. This parameter list is converted into a string before it is appended to the PI. AUTHORS
Matt Sergeant, Christian Glahn, Petr Pajas VERSION
2.0110 COPYRIGHT
2001-2007, AxKit.com Ltd. 2002-2006, Christian Glahn. 2006-2009, Petr Pajas. LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2014-02-01 XML::LibXML::PI(3)
All times are GMT -4. The time now is 04:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy