HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: find command
Operating System - Linux
1828366
Members
2855
Online
109976
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2002 01:42 AM
05-22-2002 01:42 AM
I had used find to search for user home directories having quota their quota > 40MB, in their home dirs in /usr/eng/cadeng:
/usr/eng/cadeng/joe_bloggs
/usr/eng/cadeng/willy_hacker
I did the following under /usr/eng:
# find . -type /cadeng/willy_hacker -size +40000k
Unfortunately, it did not print anything.
I had also tried the following under /usr/eng/cadeng
#find . -size +40000k
which only searches for individual files under a directorty exceeding 40MB.
I also tried :
#find . -type -d willy_hacker -size +40000k which produced:
find: 0652-009 There is a missing conjunction error
Could someone help me on this?
Thanks.
/usr/eng/cadeng/joe_bloggs
/usr/eng/cadeng/willy_hacker
I did the following under /usr/eng:
# find . -type /cadeng/willy_hacker -size +40000k
Unfortunately, it did not print anything.
I had also tried the following under /usr/eng/cadeng
#find . -size +40000k
which only searches for individual files under a directorty exceeding 40MB.
I also tried :
#find . -type -d willy_hacker -size +40000k which produced:
find: 0652-009 There is a missing conjunction error
Could someone help me on this?
Thanks.
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2002 05:04 AM
05-22-2002 05:04 AM
Re: find command
Hello Chern,
I used the following:
[root@penguin /root]# find / -size +4000k -print
/usr/lib/rpmdb/i386-redhat-linux/redhat/Basenames
/usr/lib/rpmdb/i386-redhat-linux/redhat/Packages
/usr/lib/libgcj.so.1.0.0
/usr/lib/libgcj.a
/usr/lib/libc.a
/usr/lib/netscape/netscape-communicator
/usr/lib/qt-2.3.0/lib/libqt-mt.so.2.3.0
/usr/lib/qt-2.3.0/lib/libqt.so.2.3.0
/usr/bin/gs
/usr/X11R6/lib/libMagick.a
/var/lib/rpm/Packages
/var/lib/rpm/Basenames
/proc/kcore
/lib/i686/libc-2.2.2.so
That seems to work just fine.
Thanks for participating in the forums,
Martin
Chaos reigns within. Reflect, repent, and reboot. Order shall return.
I used the following:
[root@penguin /root]# find / -size +4000k -print
/usr/lib/rpmdb/i386-redhat-linux/redhat/Basenames
/usr/lib/rpmdb/i386-redhat-linux/redhat/Packages
/usr/lib/libgcj.so.1.0.0
/usr/lib/libgcj.a
/usr/lib/libc.a
/usr/lib/netscape/netscape-communicator
/usr/lib/qt-2.3.0/lib/libqt-mt.so.2.3.0
/usr/lib/qt-2.3.0/lib/libqt.so.2.3.0
/usr/bin/gs
/usr/X11R6/lib/libMagick.a
/var/lib/rpm/Packages
/var/lib/rpm/Basenames
/proc/kcore
/lib/i686/libc-2.2.2.so
That seems to work just fine.
Thanks for participating in the forums,
Martin
Chaos reigns within. Reflect, repent, and reboot. Order shall return.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2002 03:38 PM
05-22-2002 03:38 PM
Solution
Ok, lets see if I can get this straight.
You're not looking for an individual file which is greater than 40Mb, correct? You're looking for a directory structure?
If so, 'find' won't tally up the contents of a drectory and give you a total. For that, you use the 'du' command.
cd /usr/eng/cardeng
du -x -k --max-depth=1
Whilst this won't just show directires that have greater than 40Mb, it will show the sum total of the directory structures under that tree. It'd print out somehting like:
2038 ./joe_bloggs
40283 ./willie_hacker
Beyond that, standard text-parsing tools would help you (| awk '{if ($1 > 40000) {print}}') or some such.
If you are implementing 'quota's on the filesystem, then the Quota tools should also be able to help you.
You're not looking for an individual file which is greater than 40Mb, correct? You're looking for a directory structure?
If so, 'find' won't tally up the contents of a drectory and give you a total. For that, you use the 'du' command.
cd /usr/eng/cardeng
du -x -k --max-depth=1
Whilst this won't just show directires that have greater than 40Mb, it will show the sum total of the directory structures under that tree. It'd print out somehting like:
2038 ./joe_bloggs
40283 ./willie_hacker
Beyond that, standard text-parsing tools would help you (| awk '{if ($1 > 40000) {print}}') or some such.
If you are implementing 'quota's on the filesystem, then the Quota tools should also be able to help you.
One long-haired git at your service...
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP