Sponsored Content
Top Forums Shell Programming and Scripting search files without a specific text Post 302335243 by danmero on Friday 17th of July 2009 08:22:39 PM
Old 07-17-2009
Code:
find /path -type f -exec grep -L "4R" {} \;

Read the manual for find and grep.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Search all files for specific string

Hi Friends, How can I search all files in all slices on a unix system for a particular string within the file. e.g search string 'oracle' Thanks (4 Replies)
Discussion started by: sureshy
4 Replies

2. UNIX for Dummies Questions & Answers

How to search files containing a specific word in the content

Hi all, Lets say I have 3 files a.txt and b.txt and c.txt. a.txt has the following text ==================== apple is good for health b.txt has the following text ==================== apple is pomme in french c.txt has the following text ==================== orange has citric acid... (1 Reply)
Discussion started by: amjath78
1 Replies

3. Shell Programming and Scripting

Search files that all contain 4 specific words

Hello, I want an one line command that brings me back all the files in a folder that contain 4 specific words anywhere inside them. I want to use find,xargs and grep. for example i know for one word the command would be: find . | xargs grep 'Word1' But i don't know for 4 specific words... (13 Replies)
Discussion started by: WoodenSword
13 Replies

4. UNIX for Dummies Questions & Answers

search and replace a specific text in text file?

I have a text file with following content (3 lines) filename : output.txt first line:12/12/2008 second line:12/12/2008 third line:Y I would like to know how we can replace 'Y' with 'N' in the 3rd line keeping 1st and 2nd lines same as what it was before. I tried using cat output.txt... (4 Replies)
Discussion started by: santosham
4 Replies

5. UNIX for Dummies Questions & Answers

How to search all the files in a directory for a specific string

Hi Guys, I want to search the content of all the files (of a particular type like .txt) in a directory for a specific string pattern. Can anyone help me? Thanks (7 Replies)
Discussion started by: mwrg
7 Replies

6. Shell Programming and Scripting

Find files of specific size excluding search in a subdirectory

Hi All, I was exploring find command and came across -prune option which would exclude search in a mention subdirectory. My quesry is to search all files more that 100 MB size but exclude search in a subdirectory. I am using below command,but somehow it is not working. Can anybody help me... (6 Replies)
Discussion started by: usha rao
6 Replies

7. Shell Programming and Scripting

search a file for specific text

Hello everyone, I'm a newbie here. I'm working on a ksh script on Solaris 5.10 and have a question. I'm trying to search for a word line by line in a log file, and grab the text right after it inside quotes, and assign that to a variable. For example, each line in the log will look something... (6 Replies)
Discussion started by: Kristin_in_CO
6 Replies

8. UNIX for Dummies Questions & Answers

pattern search using grep in specific range of files

Hi, I am trying to do the following: grep -l <pattern> <files to be searched for> In <files to be searched for> , all files should of some specific date like "Apr 8" not all files in current directory. I just to search within files Apr 8 files so that it won't search in entire list of... (2 Replies)
Discussion started by: apjneeraj
2 Replies

9. Shell Programming and Scripting

Help search and replace hex values only in specific files

perl -pi -e 's/\x00/\x0d\x0a/g' `grep -l $'GS' filelist` This isn't working :confused:, it's not pulling the files that contain the regex. Please help me rewrite this :wall:. Ideally for this to work on 9K of 20K files in the directory, I've tried this but I don't know enough about awk... (7 Replies)
Discussion started by: verge
7 Replies

10. Shell Programming and Scripting

Program to search for the files with specific format

Hi All, Your help on the below requirement is highly appreciated. I am building a program which should pick the file from a source directory and place them into target directory. While selecting the file in source it should look for some pattern in the file name. Ex: File Name 1:... (10 Replies)
Discussion started by: bharath561989
10 Replies
ha(1)								    HA archiver 							     ha(1)

NAME
ha - a small file archiver utility SYNOPSIS
ha <command>[<option><option>...] archive [ name ... ] DESCRIPTION
After the program name comes a command name (single letter) and options (single letters, appended to the command name without a space). COMMANDS
a[sdqemr012] Add files matching search pattern to archive. e[aqty] Extract files matching search pattern from archive. x[aqty] Extract files matching search pattern from archive using path information stored in archive. l[f] List files currently in archive. d[q] Delete files matching search pattern from archive. If archive does not contain any files after deletion it is removed. f[sdqemr012] Freshen files in archive. All files matching search pattern and newer than version already in archive are updated to archive. u[sdqemr012] Update files to archive. All files matching search pattern that are newer than version already in archive or are not yet in archive are updated to archive. t[q] Test files in archive. OPTIONS
0,1,2 Try compression method #. More than one can be specified. Methods are: 0-CPY Simple copying of files. 1-ASC Default method using sliding window dictionary followed by arithmetic coder. Offers quite good compression on wide variety of file types. 2-HSC Compression method based on finite context model and arithmetic coder. Quite slow for binary data, but offers very good compression especially for longer text files. y Assume answer yes on all questions. t Touch files when extracting. Sets file times to current machine time. r Recurse through subdirectories while searching for files matching search pattern. f Full listing of stored file information. m Move files when archiving. Files are removed from disk after they are successfully written to archive. a Set system specific file attributes when extracting files. s Find special files when archiving. e Do not store pathname information. q Quiet operation. d Make separate entries for directories. Saves information about empty directories, directory attributes etc. in archive. AUTHOR
This manual page was written by Mikhail Gusarov <dottedmag@dottedmag.net> for Debian GNU/Linux system (but may be used by others). ha 0.999p 3 Jul 2008 ha(1)
All times are GMT -4. The time now is 05:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy