Register
It is currently Tue Oct 21, 2014 4:21 am

find -wholename -prune -type -size not working


All times are UTC - 6 hours


Post new topic Reply to topic  [ 3 posts ] 
Author Message
 PostPosted: Thu Sep 02, 2010 8:24 pm   

Joined: Thu Sep 02, 2010 8:18 pm
Posts: 2
I have the following code:

Code:
find cs390/hw1/PartTwo -wholename cs390/hw1/PartTwo/include -prune -o -print -type f -size +10k | xargs ls -l


but as you can see from the output below, it does not "prune" the results to files of size 10k or larger nor does it ignore the include folder. What am I doing wrong exactly?

Code:
-rw-r--r-- 1 brandon brandon   262 2010-09-02 12:10 cs390/hw1/PartTwo/a-gFiles/a.c
-rw-r--r-- 1 brandon brandon   918 2010-09-02 12:10 cs390/hw1/PartTwo/a-gFiles/broken.c
-rw-r--r-- 1 brandon brandon   912 2010-09-02 12:10 cs390/hw1/PartTwo/a-gFiles/broken-fixed.c
-rw-r--r-- 1 brandon brandon   897 2010-09-02 12:10 cs390/hw1/PartTwo/a-gFiles/calc.c
-rw-r--r-- 1 brandon brandon   695 2010-09-02 12:10 cs390/hw1/PartTwo/a-gFiles/cat.c
-rw-r--r-- 1 brandon brandon  1635 2010-09-02 12:10 cs390/hw1/PartTwo/a-gFiles/checkflags.c
-rw-r--r-- 1 brandon brandon  1013 2010-09-02 12:10 cs390/hw1/PartTwo/a-gFiles/daytime.c
-rw-r--r-- 1 brandon brandon   382 2010-09-02 12:10 cs390/hw1/PartTwo/a-gFiles/dbsimple.c
-rw-r--r-- 1 brandon brandon   649 2010-09-02 12:10 cs390/hw1/PartTwo/a-gFiles/dircontents.c
-rw-r--r-- 1 brandon brandon   352 2010-09-02 12:10 cs390/hw1/PartTwo/a-gFiles/gather.c
-rw-r--r-- 1 brandon brandon  1500 2010-09-02 12:10 cs390/hw1/PartTwo/a-gFiles/globit.c
-rw-r--r-- 1 brandon brandon   664 2010-09-02 12:10 cs390/hw1/PartTwo/h-oFiles/hwwrite.c
-rw-r--r-- 1 brandon brandon  2489 2010-09-02 12:10 cs390/hw1/PartTwo/h-oFiles/id.c
-rw-r--r-- 1 brandon brandon 10658 2010-09-02 12:10 cs390/hw1/PartTwo/h-oFiles/ladsh1.c
-rw-r--r-- 1 brandon brandon 16018 2010-09-02 12:10 cs390/hw1/PartTwo/h-oFiles/ladsh2.c
-rw-r--r-- 1 brandon brandon 18951 2010-09-02 12:10 cs390/hw1/PartTwo/h-oFiles/ladsh3.c
-rw-r--r-- 1 brandon brandon 21814 2010-09-02 12:10 cs390/hw1/PartTwo/h-oFiles/ladsh4.c
-rw-r--r-- 1 brandon brandon   147 2010-09-02 12:10 cs390/hw1/PartTwo/h-oFiles/libhello.c
-rw-r--r-- 1 brandon brandon   889 2010-09-02 12:10 cs390/hw1/PartTwo/h-oFiles/loadhello.c
-rw-r--r-- 1 brandon brandon  1903 2010-09-02 12:10 cs390/hw1/PartTwo/h-oFiles/lock.c
-rw-r--r-- 1 brandon brandon  1629 2010-09-02 12:10 cs390/hw1/PartTwo/h-oFiles/lookup.c
-rw-r--r-- 1 brandon brandon   925 2010-09-02 12:10 cs390/hw1/PartTwo/h-oFiles/map-cat.c
-rw-r--r-- 1 brandon brandon  1742 2010-09-02 12:10 cs390/hw1/PartTwo/h-oFiles/match.c
-rw-r--r-- 1 brandon brandon  1328 2010-09-02 12:10 cs390/hw1/PartTwo/h-oFiles/minopen.c
-rw-r--r-- 1 brandon brandon  1983 2010-09-02 12:10 cs390/hw1/PartTwo/h-oFiles/mknod.c
-rw-r--r-- 1 brandon brandon   821 2010-09-02 12:10 cs390/hw1/PartTwo/h-oFiles/monitor.c
-rw-r--r-- 1 brandon brandon   829 2010-09-02 12:10 cs390/hw1/PartTwo/h-oFiles/mpx-blocks.c
-rw-r--r-- 1 brandon brandon   905 2010-09-02 12:10 cs390/hw1/PartTwo/h-oFiles/mpx-nonblock.c
-rw-r--r-- 1 brandon brandon  1951 2010-09-02 12:10 cs390/hw1/PartTwo/h-oFiles/mpx-select.c
-rw-r--r-- 1 brandon brandon    91 2010-09-02 12:10 cs390/hw1/PartTwo/include/libhello.h
-rw-r--r-- 1 brandon brandon   126 2010-09-02 12:10 cs390/hw1/PartTwo/include/ptypair.h
-rw-r--r-- 1 brandon brandon   128 2010-09-02 12:10 cs390/hw1/PartTwo/include/sockutil.h
-rw-r--r-- 1 brandon brandon  4091 2010-09-02 12:10 cs390/hw1/PartTwo/p-zFiles/passfd.c
-rw-r--r-- 1 brandon brandon  6269 2010-09-02 12:10 cs390/hw1/PartTwo/p-zFiles/phones.c
-rw-r--r-- 1 brandon brandon   541 2010-09-02 12:10 cs390/hw1/PartTwo/p-zFiles/popenglob.c
-rw-r--r-- 1 brandon brandon  2697 2010-09-02 12:10 cs390/hw1/PartTwo/p-zFiles/ptypair.c
-rw-r--r-- 1 brandon brandon  4741 2010-09-02 12:10 cs390/hw1/PartTwo/p-zFiles/ptytest.c
-rw-r--r-- 1 brandon brandon   949 2010-09-02 12:10 cs390/hw1/PartTwo/p-zFiles/readpass.c
-rw-r--r-- 1 brandon brandon  8293 2010-09-02 12:10 cs390/hw1/PartTwo/p-zFiles/robin.c
-rw-r--r-- 1 brandon brandon   665 2010-09-02 12:10 cs390/hw1/PartTwo/p-zFiles/s1.c
-rw-r--r-- 1 brandon brandon   966 2010-09-02 12:10 cs390/hw1/PartTwo/p-zFiles/services.c
-rw-r--r-- 1 brandon brandon  2218 2010-09-02 12:10 cs390/hw1/PartTwo/p-zFiles/setflags.c
-rw-r--r-- 1 brandon brandon  1539 2010-09-02 12:10 cs390/hw1/PartTwo/p-zFiles/sighup.c
-rw-r--r-- 1 brandon brandon  1880 2010-09-02 12:10 cs390/hw1/PartTwo/p-zFiles/slcharset.c
-rw-r--r-- 1 brandon brandon   645 2010-09-02 12:10 cs390/hw1/PartTwo/p-zFiles/slecho.c
-rw-r--r-- 1 brandon brandon   642 2010-09-02 12:10 cs390/hw1/PartTwo/p-zFiles/slinit.c
-rw-r--r-- 1 brandon brandon   663 2010-09-02 12:10 cs390/hw1/PartTwo/p-zFiles/sockutil.c
-rw-r--r-- 1 brandon brandon  2313 2010-09-02 12:10 cs390/hw1/PartTwo/p-zFiles/statsamp.c
-rw-r--r-- 1 brandon brandon   414 2010-09-02 12:10 cs390/hw1/PartTwo/p-zFiles/t.c
-rw-r--r-- 1 brandon brandon  1517 2010-09-02 12:10 cs390/hw1/PartTwo/p-zFiles/tclient.c
-rw-r--r-- 1 brandon brandon  1491 2010-09-02 12:10 cs390/hw1/PartTwo/p-zFiles/tserver.c
-rw-r--r-- 1 brandon brandon   889 2010-09-02 12:10 cs390/hw1/PartTwo/p-zFiles/uclient.c
-rw-r--r-- 1 brandon brandon   139 2010-09-02 12:10 cs390/hw1/PartTwo/p-zFiles/usehello.c
-rw-r--r-- 1 brandon brandon  1445 2010-09-02 12:10 cs390/hw1/PartTwo/p-zFiles/userver.c

cs390/hw1/PartTwo:
total 16
drwxr-xr-x 2 brandon brandon 4096 2010-09-02 12:10 a-gFiles
drwxr-xr-x 2 brandon brandon 4096 2010-09-02 12:10 h-oFiles
drwxr-xr-x 2 brandon brandon 4096 2010-09-02 12:10 include
drwxr-xr-x 2 brandon brandon 4096 2010-09-02 12:10 p-zFiles

cs390/hw1/PartTwo/a-gFiles:
total 44
-rw-r--r-- 1 brandon brandon  262 2010-09-02 12:10 a.c
-rw-r--r-- 1 brandon brandon  918 2010-09-02 12:10 broken.c
-rw-r--r-- 1 brandon brandon  912 2010-09-02 12:10 broken-fixed.c
-rw-r--r-- 1 brandon brandon  897 2010-09-02 12:10 calc.c
-rw-r--r-- 1 brandon brandon  695 2010-09-02 12:10 cat.c
-rw-r--r-- 1 brandon brandon 1635 2010-09-02 12:10 checkflags.c
-rw-r--r-- 1 brandon brandon 1013 2010-09-02 12:10 daytime.c
-rw-r--r-- 1 brandon brandon  382 2010-09-02 12:10 dbsimple.c
-rw-r--r-- 1 brandon brandon  649 2010-09-02 12:10 dircontents.c
-rw-r--r-- 1 brandon brandon  352 2010-09-02 12:10 gather.c
-rw-r--r-- 1 brandon brandon 1500 2010-09-02 12:10 globit.c

cs390/hw1/PartTwo/h-oFiles:
total 128
-rw-r--r-- 1 brandon brandon   664 2010-09-02 12:10 hwwrite.c
-rw-r--r-- 1 brandon brandon  2489 2010-09-02 12:10 id.c
-rw-r--r-- 1 brandon brandon 10658 2010-09-02 12:10 ladsh1.c
-rw-r--r-- 1 brandon brandon 16018 2010-09-02 12:10 ladsh2.c
-rw-r--r-- 1 brandon brandon 18951 2010-09-02 12:10 ladsh3.c
-rw-r--r-- 1 brandon brandon 21814 2010-09-02 12:10 ladsh4.c
-rw-r--r-- 1 brandon brandon   147 2010-09-02 12:10 libhello.c
-rw-r--r-- 1 brandon brandon   889 2010-09-02 12:10 loadhello.c
-rw-r--r-- 1 brandon brandon  1903 2010-09-02 12:10 lock.c
-rw-r--r-- 1 brandon brandon  1629 2010-09-02 12:10 lookup.c
-rw-r--r-- 1 brandon brandon   925 2010-09-02 12:10 map-cat.c
-rw-r--r-- 1 brandon brandon  1742 2010-09-02 12:10 match.c
-rw-r--r-- 1 brandon brandon  1328 2010-09-02 12:10 minopen.c
-rw-r--r-- 1 brandon brandon  1983 2010-09-02 12:10 mknod.c
-rw-r--r-- 1 brandon brandon   821 2010-09-02 12:10 monitor.c
-rw-r--r-- 1 brandon brandon   829 2010-09-02 12:10 mpx-blocks.c
-rw-r--r-- 1 brandon brandon   905 2010-09-02 12:10 mpx-nonblock.c
-rw-r--r-- 1 brandon brandon  1951 2010-09-02 12:10 mpx-select.c

cs390/hw1/PartTwo/include:
total 12
-rw-r--r-- 1 brandon brandon  91 2010-09-02 12:10 libhello.h
-rw-r--r-- 1 brandon brandon 126 2010-09-02 12:10 ptypair.h
-rw-r--r-- 1 brandon brandon 128 2010-09-02 12:10 sockutil.h

cs390/hw1/PartTwo/p-zFiles:
total 104
-rw-r--r-- 1 brandon brandon 4091 2010-09-02 12:10 passfd.c
-rw-r--r-- 1 brandon brandon 6269 2010-09-02 12:10 phones.c
-rw-r--r-- 1 brandon brandon  541 2010-09-02 12:10 popenglob.c
-rw-r--r-- 1 brandon brandon 2697 2010-09-02 12:10 ptypair.c
-rw-r--r-- 1 brandon brandon 4741 2010-09-02 12:10 ptytest.c
-rw-r--r-- 1 brandon brandon  949 2010-09-02 12:10 readpass.c
-rw-r--r-- 1 brandon brandon 8293 2010-09-02 12:10 robin.c
-rw-r--r-- 1 brandon brandon  665 2010-09-02 12:10 s1.c
-rw-r--r-- 1 brandon brandon  966 2010-09-02 12:10 services.c
-rw-r--r-- 1 brandon brandon 2218 2010-09-02 12:10 setflags.c
-rw-r--r-- 1 brandon brandon 1539 2010-09-02 12:10 sighup.c
-rw-r--r-- 1 brandon brandon 1880 2010-09-02 12:10 slcharset.c
-rw-r--r-- 1 brandon brandon  645 2010-09-02 12:10 slecho.c
-rw-r--r-- 1 brandon brandon  642 2010-09-02 12:10 slinit.c
-rw-r--r-- 1 brandon brandon  663 2010-09-02 12:10 sockutil.c
-rw-r--r-- 1 brandon brandon 2313 2010-09-02 12:10 statsamp.c
-rw-r--r-- 1 brandon brandon  414 2010-09-02 12:10 t.c
-rw-r--r-- 1 brandon brandon 1517 2010-09-02 12:10 tclient.c
-rw-r--r-- 1 brandon brandon 1491 2010-09-02 12:10 tserver.c
-rw-r--r-- 1 brandon brandon  889 2010-09-02 12:10 uclient.c
-rw-r--r-- 1 brandon brandon  139 2010-09-02 12:10 usehello.c
-rw-r--r-- 1 brandon brandon 1445 2010-09-02 12:10 userver.c


Top
 Profile  
 PostPosted: Fri Sep 03, 2010 10:27 am   
User avatar

Joined: Tue Apr 27, 2010 2:28 pm
Posts: 172
Location: Czech Republic
I cannot replicate your problem. Can you try to make a smaller example, containig just two or three files? Also, the
Quote:
cs390/hw1/PartTwo/include:
total 12
part looks like
Code:
ls *
or
Code:
ls -R
has been called. I do not get it from
Code:
ls -l
.


Top
 Profile  
 PostPosted: Fri Sep 03, 2010 1:47 pm   

Joined: Thu Sep 02, 2010 8:18 pm
Posts: 2
It might be worth noting that I am running Ubuntu Lucid Lynx.

I ran the exact same command:

Quote:
find cs390/hw1/PartTwo -wholename cs390/hw1/PartTwo/include -prune -o -print -type f -size +10k | xargs ls -l


and got the following output:
Code:
-rw-r--r-- 1 brandon brandon   262 2010-09-02 12:10 cs390/hw1/PartTwo/a/a.c
-rw-r--r-- 1 brandon brandon 21814 2010-09-02 12:10 cs390/hw1/PartTwo/b/ladsh4.c
-rw-r--r-- 1 brandon brandon  4091 2010-09-02 12:10 cs390/hw1/PartTwo/c/passfd.c

cs390/hw1/PartTwo:
total 16
drwxr-xr-x 2 brandon brandon 4096 2010-09-03 14:42 a
drwxr-xr-x 2 brandon brandon 4096 2010-09-03 14:43 b
drwxr-xr-x 2 brandon brandon 4096 2010-09-03 14:43 c
drwxr-xr-x 2 brandon brandon 4096 2010-09-03 14:44 include

cs390/hw1/PartTwo/a:
total 4
-rw-r--r-- 1 brandon brandon 262 2010-09-02 12:10 a.c

cs390/hw1/PartTwo/b:
total 24
-rw-r--r-- 1 brandon brandon 21814 2010-09-02 12:10 ladsh4.c

cs390/hw1/PartTwo/c:
total 4
-rw-r--r-- 1 brandon brandon 4091 2010-09-02 12:10 passfd.c


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP