10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How can i tweak the below find command to exclude directory/s -> "/tmp/logs"
find . -type f \( ! -name "*.log*" ! -name "*.jar*" \) -printNote: -path option/argument does not work with the version of find that i have.
bash-3.2$ uname -a
SunOS mymac 5.10 Generic_150400-26 sun4v sparc sun4v (7 Replies)
Discussion started by: mohtashims
7 Replies
2. UNIX for Dummies Questions & Answers
hello,
i want to use "-depth" in command "find" and want to exclude a directory.
the find command should work in HP-UX and Linux.
i see in the find man page:
-prune
If -depth is not given, true; do not descend the current directory.
If -depth is given, false; no effect.
-depth... (3 Replies)
Discussion started by: bora99
3 Replies
3. UNIX for Dummies Questions & Answers
i have this find command on my script as:
for i in `find $vdir -name "$vfile" -mtime +$pday`
the problem with this code is that the sub-directories are included on the search. how do i restrict the search to confine only on the current directory and ignore the sub-directories. please advise.... (7 Replies)
Discussion started by: wtolentino
7 Replies
4. Shell Programming and Scripting
Hi All,
First my OS version is:
ksh:0$ uname -a
SunOS 5.9 Generic_122300-48 sun4u sparc SUNW,Sun-Fire-V440
I want to exclude the following DIR(./country111) in my search pattern:
ksh:0$ find . -name "*.tar"
./country111/COUNTRY_BATCH-801.tar
./country111/COUNTRY_BATCH-802.tar... (3 Replies)
Discussion started by: saps19
3 Replies
5. Shell Programming and Scripting
Hi,
I'm in the process of writing a shell script which will be ran under cron hourly and will check for files of specific age in my ftp folder, then moves those over inside a folder called "old" (which is within the ftp dir). But, I'm unable to figure out how to exclude the "old" folder when... (1 Reply)
Discussion started by: mutex1
1 Replies
6. Shell Programming and Scripting
Hello all,
I am having a hard type in figuring out how to only gather certain files in the current directory without exploring its subdirectories.
I tried:
find . -name "*.ksh" -prune
this also returns ksh files from lower subdirectories.
I also tried
find . -ls -name "*.ksh"
This also... (8 Replies)
Discussion started by: gio001
8 Replies
7. Shell Programming and Scripting
I'm using bash on cygwin/windows.
I'm trying to use find and exclude the directory /cygdrive/c/System\ Volume\ Information. When I try to use the command below I get the error "rm: cannot remove `/cygdrive/c/System Volume Information': Is a directory.
Can someone tell me what I am doing... (3 Replies)
Discussion started by: siegfried
3 Replies
8. UNIX for Dummies Questions & Answers
Hello,
I just want to ask the following use of find command:
1. how can I find files only to the current directory?
2. how can I find files to directories and all subdiretories (are this include soft links?) but will not go to other mountpoints that is under that mountpoint.
Im combining... (1 Reply)
Discussion started by: james_falco
1 Replies
9. UNIX for Dummies Questions & Answers
Using Solaris 8, I've forgotten how to exclude the current directory in the find results.
find . -type d ! -name "*.CAP"
I want every directory that does not match the *.CAP pattern, except the current directory. (2 Replies)
Discussion started by: dangral
2 Replies
10. UNIX for Dummies Questions & Answers
I am trying to use the find command to find files in the current directory that meet a certain date criteria.
find . -type -f -mtime +2
However, the above also checks the directories below.
I tried -prune, but that seems to ignore this directory completely.
I read about using -path w/... (5 Replies)
Discussion started by: jliebling
5 Replies