Sponsored Content
Top Forums Shell Programming and Scripting Find files of specific size excluding search in a subdirectory Post 302412159 by alister on Monday 12th of April 2010 01:59:55 AM
Old 04-12-2010
Quote:
Originally Posted by usha rao
Code:
 
find /logs \( -name /logs/wu01/tmpbuild -prune \) -type f -size +1000k

-name only matches against the basename, so that -name primary will never match, since forward slashes cannot occur in a basename. What you want is to use -path. Also, you need to or (-o) the tempbuild-prune related primaries or they will cause the expression evaluated by find to be false for all non-pruned pathnames (meaning find will never match anything).

Code:
 
find /logs \( -path /logs/wu01/tmpbuild -prune \) -o \( -type f -size +1000k \)

Regards,
Alister

Last edited by alister; 04-12-2010 at 03:16 AM..
 

10 More Discussions You Might Find Interesting

1. Solaris

command to find out total size of a specific file size (spread over the server)

hi all, in my server there are some specific application files which are spread through out the server... these are spread in folders..sub-folders..chid folders... please help me, how can i find the total size of these specific files in the server... (3 Replies)
Discussion started by: abhinov
3 Replies

2. Shell Programming and Scripting

search for files excluding binary files

Hi All, I need a solution on my following find command find ./.. -name '*.file' -print BTW This gives me the output as belows ./rtlsim/test/ADCONV0/infile/ad0_dagctst.file ./rtlsim/test/ADCONV0/user_command.file ./rtlsim/test/ADCONV0/simv.daidir/scsim.db.dir/scsim.db.file... (2 Replies)
Discussion started by: user_prady
2 Replies

3. Shell Programming and Scripting

Find files including subdirectory and Delete

Hello Experts, I m newbie. Could u pls help me to write script on Sun solaris- I have backup directory "/var/opt/backup/" where files are backed up in different directory "backup1" "backup2" "backup3". I want to write a shell script which i will put in crontab and daily midnight it will... (1 Reply)
Discussion started by: thepurple
1 Replies

4. Shell Programming and Scripting

Find files in directory and its subdirectory

I am writing a script which reads a file line by line and then assigns it to a variable like this 1090373422_4028715212.jpg. I have images with file name of this format in some other directory. In my script I want to assign variable with this file name and then find this filename in some other... (11 Replies)
Discussion started by: jyotib
11 Replies

5. Shell Programming and Scripting

search text in files within the subdirectory

Hello, I am trying to write a shell script to search for a pattern in the directory and show only one entry for each field, essentially I am looking to search for a pattern in a file and list that file name. (1 Reply)
Discussion started by: grajp002
1 Replies

6. Shell Programming and Scripting

Search for file and size subdirectory as well

Hi I made this code to search in directory for file and size How can I remodel it to seach in the sub direcotry as well Thanks #!/bin/bash echo -n "Enter: " read var if then echo "Directory exists: ${var}" size=`du -hs "${var}"` echo The size of the current folder is... (4 Replies)
Discussion started by: lio123
4 Replies

7. UNIX for Dummies Questions & Answers

How to Find files in subdirectory?

I am trying to find all DAT files in a subdirectory named IN. I do not know the entire path. For example: /stage/<?>/<?>/IN/file.DAT I am using the find command without success: find /stage -name IN -a -name '*.DAT' -print What is the correct logic and syntax? Thank you for the help. (5 Replies)
Discussion started by: TwinGT
5 Replies

8. Shell Programming and Scripting

Find command to search files in a directory excluding subdirectories

Hi Forum, I am using the below command to find files older than x days in a directory excluding subdirectories. From the previous forums I got to know that prune command helps us not to descend in subdirectories. Though I am using it here, not getting the desired result. cd $dir... (8 Replies)
Discussion started by: jhilmil
8 Replies

9. Shell Programming and Scripting

Search for specific file type in subdirectory with multiple folders

I have a directory that is in the below order (the --- is not part of the directory tree, only there to help illustrate: DATE --- main level Folder1 --- level under DATE plugin_out --- level under Folder1 variantCaller_out.40 --- level under plugin_out 001,002,003 --- level under... (3 Replies)
Discussion started by: cmccabe
3 Replies

10. UNIX for Beginners Questions & Answers

How to sort the files by size and based subdirectory un UNIX?

I have the below input data in a file and need to get the output as mentioned below. Need to sort the data by size(Asc/des)/by subdirectory Below is the input which is there in a file: 120 /root/path2/part-00000-d3700305-428d-4b13-8161-42051f4ac5ed-c000.json 532 ... (3 Replies)
Discussion started by: ajarramuk
3 Replies
TOMOYO-AUDITD(8)					  System Administration Utilities					  TOMOYO-AUDITD(8)

NAME
tomoyo-auditd - access request log recording daemon for TOMOYO Linux SYNOPSIS
tomoyo-auditd tomoyo-auditd [remote_ip:remote_port] DESCRIPTION
This program reads access request logs from the kernel and writes to the locations specified in the configuration file. By running this program at startup, access request logs for either all domains or selected domains can be stored. The format of the stored logs is similar to domain policy, so they can be used to help develop policy. Configure this daemon in /etc/tomoyo/tools/auditd.conf. If an access request matches a rule, it will be written to the specified log file. This can be used to split access request logs into multiple files. Only the first matching rule is used, so any single access request log will be written to a maximum of one output file. If an access request log does not match any rules, it will be discarded. Start this program from an appropriate stage during startup (e.g. /etc/rc.local). OPTIONS
remote_ip:remote_port Retrieve access request logs from a remote system via an agent, connecting to the specified IP address and port number. BUGS
If you find any bugs, send an email to <tomoyo-users-en@lists.sourceforge.jp>. AUTHORS
Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Main author. Jamie Nguyen <jamie@tomoyolinux.co.uk> Documentation and website. SEE ALSO
tomoyo-editpolicy-agent(8) See <http://tomoyo.sourceforge.jp> for more information. tomoyo-tools 2.5.0 2012-04-14 TOMOYO-AUDITD(8)
All times are GMT -4. The time now is 09:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy