- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- find command
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
06-12-2002 08:54 AM
06-12-2002 08:54 AM
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2002 09:06 AM
06-12-2002 09:06 AM
Solutionfind . ! \( -path './adm*' -o -path './TT_DB* \)
This would exclude the ./adm directory and the
./TT_DB directory.
Man find for details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2002 09:11 AM
06-12-2002 09:11 AM
Re: find command
Consider this example, which searches /tmp but does not descend the /tmp/dummy directory:
# find /tmp \( -name "f*" -a ! -path "/tmp/dummy/*" \)
This will return all files in '/tmp/' but *not* 'tmp/dummy/' that begin with the letter "f". Note the quotes so that the shell doesn't expand the expresssion.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2002 12:06 PM
06-12-2002 12:06 PM
Re: find command
du -a / | grep -i foo
This is faster, less resource intensive, and has all the power of grep for matching you filename(s). You can use grep -v to eliminmate your temp and logfile paths, for you can do something like:
for PATH in $(ls / |egrep -v "temp_dir|log_dir")
do
du -a $PATH | grep -i FILENAME
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2002 05:24 PM
06-12-2002 05:24 PM
Re: find command
For instance, why look for core files to purge when you can prevent them completely with ulimit -c 0? And if an application was installed but did not document where it was stored, there's no need to look in /stand or /etc or /dev, but instead look in /opt, /usr/contrib/bin and /usr/local/bin using ls, not find.
Bill Hassell, sysadmin