- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- HP UNIX Find Comamnd
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
10-29-2004 02:19 AM
10-29-2004 02:19 AM
HP UNIX Find Comamnd
What is the command line arguement that will only allow find go 1 level deep?
I have try -depth, it does not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2004 02:28 AM
10-29-2004 02:28 AM
Re: HP UNIX Find Comamnd
For example, you can achieve the hypothetical find command: -
find . -name "*fish*" -mysticaldepth 1
with
ls -d *fish* */*fish*
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2004 02:33 AM
10-29-2004 02:33 AM
Re: HP UNIX Find Comamnd
-xdev will cause not to cross the FS boundries..you can also check prune option in find man page..
Cheers
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2004 02:35 AM
10-29-2004 02:35 AM
Re: HP UNIX Find Comamnd
-xdev will avoid any mounted file systems below the intial path...
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2004 02:39 AM
10-29-2004 02:39 AM
Re: HP UNIX Find Comamnd
I am using the -mtime option to remove old files. But, I do not want it to go more than just that directory.
I have try -depth, -prune, -fonely, -only, etc. None of them do what I need.
Here is my command:
/bin/find . -type f -mtime +7 -exec rm {} \;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2004 02:44 AM
10-29-2004 02:44 AM
Re: HP UNIX Find Comamnd
find . -path "./*" -prune -print
The -path option will restrict it to 1 level. For 2 levels, -path "./*/*".
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2004 05:43 AM
10-29-2004 05:43 AM
Re: HP UNIX Find Comamnd
mark