Sponsored Content
Full Discussion: find/grep command
Operating Systems HP-UX find/grep command Post 302310094 by vgersh99 on Thursday 23rd of April 2009 05:51:51 PM
Old 04-23-2009
Quote:
Originally Posted by TonyFullerMalv
Did not answer two of your points:
Using mv means the permissions of the new file override the permissions of the original file, unlike a cp.
In that case you'd probably need a 'cp -p'
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

piping the output of find command to grep

Hi, I did not understand why the following did not work out as I expected: find . -name "pqp.txt" | grep -v "Permission" I thought I would be able to catch whichever paths containing my pqp.txt file without receiving the display of messages such as "find: cannot access... Permisson... (1 Reply)
Discussion started by: 435 Gavea
1 Replies

2. UNIX for Dummies Questions & Answers

Find command with Grep

I need to find for a particular string in my /opt file system. find . -exec grep "10000" {} \; I tried this command, it works ok but I want not to search in the logs folder I have in my filesystem as it takes lot of time. SO can I exclude one or more than on directory or sub directories from... (10 Replies)
Discussion started by: venu_nbk
10 Replies

3. UNIX for Dummies Questions & Answers

Search / Find / grep command ...

Is there any command, so I can retrieve all the records in a file from the first occurance of a search string, within that file? (4 Replies)
Discussion started by: videsh77
4 Replies

4. UNIX for Dummies Questions & Answers

Find Exactly word in grep command

Hi all How can i find Exactly line using grep. my input file: avg_configfile: Recalculation Dates|4| Recalculation|147| I tryed like; grep ^"Recalculation" avg_configfile out put; Recalculation Dates|4| Recalculation|147| But i want second line avg_configfile.i.e... (4 Replies)
Discussion started by: koti_rama
4 Replies

5. Shell Programming and Scripting

Complex find grep or sed command

Haven't worked in bash for ages. did a good bit of shell scripting in regular sh, but have forgotten most of it. I have several thousand php files that now include the following line at the end of the file. There is no LF or CR/LF before it begins, it is just concatenated to the final line of... (3 Replies)
Discussion started by: sjburden
3 Replies

6. Shell Programming and Scripting

help in find and grep command !

i have some 2000 file. i need to grep a particular word in all those files and list the filename that contains it? grep -l '0008345923LG' *.* the above command is not working? giving o/p as arg list too long PLZ anyone help me Thnaks in advance (1 Reply)
Discussion started by: ali560045
1 Replies

7. Shell Programming and Scripting

How to use grep & find command to find references to a particular file

Hi all , I'm new to unix I have a checked project , there exists a file called xxx.config . now my task is to find all the files in the checked out project which references to this xxx.config file. how do i use grep or find command . (2 Replies)
Discussion started by: Gangam
2 Replies

8. UNIX for Dummies Questions & Answers

find with grep command

Hi, I'm using the below command to search the files with the patterns given below. Created a file "searchtest.sh" with all the patterns. The below find command retrieves the file "AB940Insert.xml" also which shouldn't be in the desired output. Any help to fine tune the find command and to... (1 Reply)
Discussion started by: venkatesht
1 Replies

9. UNIX for Dummies Questions & Answers

Find/grep Command

Kinldy help me to write the find command on following: There are different version of file 'abc.txt' located in many folders similar as below. /home/gupta/abc.txt /home/gupta/db/abc.txt /home/gupta/temp/abc.txt /home/gupta/db/test/abc.txt 1) I want to know... (4 Replies)
Discussion started by: ravigupta2u
4 Replies

10. Shell Programming and Scripting

[Solved] Grep within find command

Platform: AIX 6.1/ksh Question1. I want to grep for the string "CUSTOM_PKMS" in all the files in server except those files with extensions .dbf , .ctl and .dmp I started running the following command but it is taking too long because there are lots of .dbf , .ctl and .dmp files in this... (6 Replies)
Discussion started by: John K
6 Replies
ZGREP(1)						    BSD General Commands Manual 						  ZGREP(1)

NAME
zgrep, zegrep, zfgrep -- print lines matching a pattern in gzip-compressed files SYNOPSIS
zgrep [grep-flags] [--] pattern [files ...] zegrep [grep-flags] [--] pattern [file ...] zfgrep [grep-flags] [--] pattern [file ...] DESCRIPTION
zgrep runs grep(1) on files or stdin, if no files argument is given, after decompressing them with zcat(1). The grep-flags and pattern arguments are passed on to grep(1). If an -e flag is found in the grep-flags, zgrep will not look for a pattern argument. zegrep calls egrep(1), while zfgrep calls fgrep(1). EXIT STATUS
In case of missing arguments or missing pattern, 1 will be returned, otherwise 0. SEE ALSO
egrep(1), fgrep(1), grep(1), gzip(1), zcat(1) AUTHORS
Thomas Klausner <wiz@NetBSD.org> BSD
December 28, 2003 BSD
All times are GMT -4. The time now is 08:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy