LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Find Techniques (https://www.linuxquestions.org/questions/linux-general-1/find-techniques-632582/)

SBN 04-02-2008 09:12 PM

Find Techniques
 
Hey guys im trying to use find to search for files that belong to certain user which has a range of file size ex. 10k to 100k. Do you know how to make this possible...

beadyallen 04-02-2008 10:28 PM

It's all on the find man page, but the following will work:
Code:

find /dir/path -size +10k -size -100k -user <username>
An -and is implicitly implied. So the above looks for files that are more than 10k AND less than 100k AND owned by the user <username>.

SBN 04-03-2008 12:36 AM

:Doh thank you ive been doing the same but it seems i did some mistake thank you...

SBN 04-03-2008 08:21 PM

Hi this doesnt work, its like it wont work if there are 2 -size.

beadyallen 04-03-2008 08:38 PM

Strange, it works for me. What version of find are you using? Maybe your version needs '-and' between the arguments. Try:
Code:

find /dir/path -size +10k -and -size -and -100k -and -user <username>

frenchn00b 04-04-2008 09:56 AM

when it is too difficult, I use kfind
or wine totalcommander.exe

:)

SBN 04-05-2008 12:30 AM

yup the -and works... thank :D


All times are GMT -5. The time now is 06:49 AM.