|
|
|
|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
Find command with exclusions
Hi All
I need to find the biggest files on our system BUT excluding some directories. I.E Find / -size +10000 (excluding 'platform'|'db' ..etc) |sort -n > file I tried grep -v but that can only do one expression at a time. Tried /usr/xpg4/bin/grep but cant use -v Please help Chris |
| Sponsored Links |
|
|
|
|||
|
The "c" stands for bytes (I guess originally "characters" but with Unicode and what not, that is not any longer one-to-one with bytes ... the "b" suffix is already used for "blocks" though) but isn't strictly necessary. As you might imagine, the manual page has more information. Another approach is to use find's own options to exclude certain directories. The syntax is somewhat tricky but if you have GNU find, there is a rich set of conditions you can use to identify particular directories for inclusion or exclusion. A common trick is to select the directories you want to exclude and use -prune on them. So for example Code:
find / -path /platform -prune -o -path /db -prune -o -size +10000 -ls |
|
|||
|
Thanks era !
|
| Sponsored Links |
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to find a file named vijay in a directory using find command | amirthraj_12 | UNIX for Dummies Questions & Answers | 6 | 10-25-2008 01:37 PM |
| Help Required: Command to find IP address and command executed of a user | loggedout | Security | 2 | 08-06-2008 09:12 PM |
| Little bit weired : Find files in UNIX w/o using find or where command | jatin.jain | Shell Programming and Scripting | 10 | 09-19-2007 07:47 AM |
| command find returned bash: /usr/bin/find: Argument list too long | yacsil | Shell Programming and Scripting | 1 | 12-15-2003 06:38 PM |
| how to find a file in UNIX without find command? | bluo | Shell Programming and Scripting | 3 | 09-25-2003 12:47 AM |