LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 04-02-2008, 10:12 PM   #1
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Rep: Reputation: 30
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...
 
Old 04-02-2008, 11:28 PM   #2
beadyallen
Member
 
Registered: Mar 2008
Location: UK
Distribution: Fedora, Gentoo
Posts: 209

Rep: Reputation: 36
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>.
 
Old 04-03-2008, 01:36 AM   #3
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Original Poster
Rep: Reputation: 30
oh thank you ive been doing the same but it seems i did some mistake thank you...
 
Old 04-03-2008, 09:21 PM   #4
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Original Poster
Rep: Reputation: 30
Hi this doesnt work, its like it wont work if there are 2 -size.
 
Old 04-03-2008, 09:38 PM   #5
beadyallen
Member
 
Registered: Mar 2008
Location: UK
Distribution: Fedora, Gentoo
Posts: 209

Rep: Reputation: 36
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>

Last edited by beadyallen; 04-05-2008 at 08:10 AM.
 
Old 04-04-2008, 10:56 AM   #6
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,546

Rep: Reputation: 51
when it is too difficult, I use kfind
or wine totalcommander.exe

 
Old 04-05-2008, 01:30 AM   #7
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Original Poster
Rep: Reputation: 30
yup the -and works... thank
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
encoding techniques in thickserver mathimca05 Linux - Newbie 1 10-15-2007 01:10 AM
Error Handling Techniques ( C ) Centinul Programming 6 10-12-2006 11:49 AM
LXer: Advanced techniques for using the UNIX find command LXer Syndicated Linux News 0 05-04-2006 05:21 AM
Techniques of TV dlynch912 General 1 04-17-2006 05:54 AM
backup techniques in solaris. waqar Solaris / OpenSolaris 3 03-12-2006 04:24 PM


All times are GMT -5. The time now is 08:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration