Unix/Linux Go Back    


Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

find and replace command

Shell Programming and Scripting


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 12-07-2009
prakash.gr prakash.gr is offline
Registered User
 
Join Date: Jun 2008
Last Activity: 17 May 2010, 10:00 AM EDT
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
find and replace command

Hi,

i used to do on soalris box but in linux box i am not able to do

advice is appreciated


Code:
uname -a
Linux intranet 2.4.20-pre3 #1 Tue May 6 17:55:35 IST 2008 i686 unknown


[dshah3@intranet include]$ find /usr/local/ -type f | xargs perl -pi -e 's/172.16.1.14/172.16.1.27/g'
Can't remove /usr/local/bin/dbhome: Permission denied, skipping file.
Can't remove /usr/local/bin/oraenv: Permission denied, skipping file.
Can't remove /usr/local/bin/coraenv: Permission denied, skipping file.
Can't remove /usr/local/bin/pcregrep: Permission denied, skipping file.
Can't remove /usr/local/bin/pcretest: Permission denied, skipping file.
Can't remove /usr/local/bin/pcre-config: Permission denied, skipping file.
Can't remove /usr/local/include/cdemo6.h: Permission denied, skipping file.
Can't remove /usr/local/include/cdemo82.h: Permission denied, skipping file.
Can't remove /usr/local/include/cdemobj.h: Permission denied, skipping file.
Can't remove /usr/local/include/cdemocor.h: Permission denied, skipping file.
Can't remove /usr/local/include/cdemodp.h: Permission denied, skipping file.
Can't remove /usr/local/include/cdemodp0.h: Permission denied, skipping file.
Can't remove /usr/local/src/kernel2.4.28/config: Permission denied, skipping file.
xargs: unmatched single quote

Thanks

Prakash

Last edited by pludi; 12-07-2009 at 02:42 PM.. Reason: code tags, please...
Sponsored Links
    #2  
Old Unix and Linux 12-07-2009
quirkasaurus's Unix or Linux Image
quirkasaurus quirkasaurus is offline Forum Advisor  
Registered User
 
Join Date: Jan 2009
Last Activity: 9 September 2015, 11:46 AM EDT
Location: canton, michigan
Posts: 486
Thanks: 0
Thanked 10 Times in 10 Posts
it found a file with a single quote in the file name.
run the find command without piping it to perl, redirecting the errors to /dev/null
and you might find it.


Code:
find /usr/local/ -type f 2>/dev/null | grep \'

Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
find and replace and keep Celvin VK Shell Programming and Scripting 3 04-03-2009 01:34 PM
Sed command to find, manipulate and replace a number LT_2008 Shell Programming and Scripting 6 11-13-2008 10:28 AM
find and replace command in one line using one command vasikaran UNIX for Dummies Questions & Answers 10 08-20-2008 10:40 AM
how to use sed or perl command to find and replace a directory in a file wip_vasikaran UNIX for Dummies Questions & Answers 1 08-20-2008 06:22 AM
find and replace in XML wip_vasikaran UNIX for Dummies Questions & Answers 2 09-27-2007 12:16 PM



All times are GMT -4. The time now is 11:04 PM.