find issue


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users find issue
# 1  
Old 01-24-2006
find issue

I'm trying to use find command to generate a list of a files w/ a specific extension (.axv), but I would also like to exclude/grep out another directory completely from the search (Archive). I have been poking around various sites/forums and man pages and haven't figured this out.

tb
# 2  
Old 01-24-2006
I can't tell exactly what you want, but you can negate selections of filenames with the bang ( ! ):
Code:
find /some/path -name \*.axv ! -name  /some/path/Archive\* -print

# 3  
Old 01-25-2006
i ended up doing the following and it appeared to work.

find . -name "*.axv" | grep -v "Archive"
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find and grep issue

Hi, I need to find all file in a directory dated yesterday and not today and then zip them into a zip file @ new location without affecting the existing files. My OS : SunOS Sparc 5.10 (5 Replies)
Discussion started by: mohtashims
5 Replies

2. Shell Programming and Scripting

Find command issue

Hi Guys, I have a file called error.logs. am just trying to display the content in the file which was modified last 1 day. I tried below command but it doesnt give the proper output. find /u/text/vinoth/bin "error.logs" -mtime -1 -exec cat {} \; >> mail.txt Any help is much... (21 Replies)
Discussion started by: Vinoth Kumar G
21 Replies

3. Shell Programming and Scripting

Issue in Find and mv command

Hi I am using the below code to find mv the files. Files are moving to the Target location as expected but find is displaying some errors like below. find ./ -name "Archive*" -mtime +300 -exec mv {} /mnt/X/ARC/ \; find: `./Archive_09-30-12': No such file or directory find:... (6 Replies)
Discussion started by: rakeshkumar
6 Replies

4. Shell Programming and Scripting

Find command issue

Guys, Here is my requirement.. Sample.cfg file="*log.gz *txt.gz" sample.sh #!/bin/sh . $HOME/Sample.cfg find . -name "$file" -mtime +20 -exec ls -la {} \; Its not finding the given *log.gz and txt.gz files. Could anyone please help me? (8 Replies)
Discussion started by: AraR87
8 Replies

5. Linux

find command issue

Hi, I am not root user. I am trying to find the file which has contains pattern "fvsfile" in root directory. If i run the find cmd then i got permission denied and all the files are listed include pattern files. i cant get file name yet find . print | xargs grep -i "fvsfile" I want... (2 Replies)
Discussion started by: Mani_apr08
2 Replies

6. Shell Programming and Scripting

Issue with Find Command

Hi All, I'm a bit new to Linux environment, moderately okay when it comes to Unix AIX. I'm facing an issue while trying to run a simple find command: $ for file in `find . -name *.*` > do > ls $file > done This is throwing the following error: Strangely, a few minutes... (4 Replies)
Discussion started by: adi_2_chaos
4 Replies

7. UNIX for Dummies Questions & Answers

Find in files issue

So, I'm back with another, pretty much similar question. I've got a catalogue, with about 60k text files. Every file contains a single line of text with variable number of characters. Here are some examples, which will make my case easier to understand: Example file 1. <item id="2506"/><item... (3 Replies)
Discussion started by: kalik
3 Replies

8. UNIX for Dummies Questions & Answers

Find command issue

I am currently using below command to get the 1st three characters of a file(PDM). Issue is, when i use find command in root dir, it finds all the files in sub dir also. How to limit the find command search to a given path only(ie: say only find file in apps/cmplus/datamigration/data path... (3 Replies)
Discussion started by: abhi_n123
3 Replies

9. Shell Programming and Scripting

Find and replace issue

Hello Guys i am seeking help here is my issue I have several files i need to find "&" char and replcae with &amp; or &apos; 1) It may be possible that in a file there are several occurance of &, &amp; or &apos; but need to replace only & whihc does not have amp; and apos; 2)it may be the case out of... (7 Replies)
Discussion started by: lokaish23
7 Replies

10. Shell Programming and Scripting

An issue with find command.

Hi all, I have a shell script(ksh) which has the code as follows. ------------------ cd $mydir for i in `find ./ -type f -mtime +$k` do echo $i done ----------------------- And in $mydir , i have some files which have space in theie names like "Case att15". The out put of the... (6 Replies)
Discussion started by: rajugp1
6 Replies
Login or Register to Ask a Question