- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Help about 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
05-20-2002 07:11 AM
05-20-2002 07:11 AM
Rreading find man pages i've seen some option like -depth, -prune etc. but i don't understand how can I use it.
Could You help me to understand these options?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2002 07:22 AM
05-20-2002 07:22 AM
Re: Help about find command
Try this command:
find
-USA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2002 07:25 AM
05-20-2002 07:25 AM
SolutionBy design, 'find' recursively descends the directory path presented to it.
The '-xdev' (or '-mountstop') option prevents descending mountpoints below the starting path. For example, compare:
# find / -name "*.log"
versus
# find / -name "*.log" -xdev
The '-depth' option allows the files in directories to be processed *before* the directory itself. This is most useful in copies.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2002 07:30 AM
05-20-2002 07:30 AM
Re: Help about find command
I dont use find but use awk to do this , to get the list of files like this
ls -l | awk '{if ($6=="May" && $7=="6") print $NF}' > test
the test file will have list of files created for May 6th . You can be more creative with awk as you can use >,<,= in the arguments .
Then you can use test file as an argument to delete ,etc
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2002 07:33 AM
05-20-2002 07:33 AM
Re: Help about find command
You can do this ..
# cd /a
# find . \( -name b -prune \) -o -mtime +2 -exec rm -f {} \;
The above will exclude dir /a/b from the search. Test it first with some other action like "ll {} \;" before running the actual remove.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2002 07:44 AM
05-20-2002 07:44 AM
Re: Help about find command
This thread may help you:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xcfd194f22a31d6118fff0090279cd0f9,00.html
HTH,
Shiju