- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: About the "find" comand
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
Discussions
Discussions
Forums
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
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
тАО01-09-2005 07:38 PM
тАО01-09-2005 07:38 PM
find /tmp -mtime +10 -exec ls -lt {} \;
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-09-2005 07:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-09-2005 08:34 PM
тАО01-09-2005 08:34 PM
Re: About the "find" comand
$find /var/home/sks -name big -o -type d -prune
Also refer the link:
http://www.grymoire.com/Unix/Find.html
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-09-2005 09:49 PM
тАО01-09-2005 09:49 PM
Re: About the "find" comand
Therefore if you stick to this find you will have to "-prune" all directories that need to be excluded, which can really get a bit of a pain (i.e. lots of logical operands and ugly brackets).
The only little alleviation would be to maybe restrict the serach to the filesystem, and using -xdev to prevent crossing of filesystems (but this doesn't improve anything in your case)
To make your job easier I'd suggest you install the GNU find on your HP-UX box.
This find offers apart from many more other features an option -maxdepth where you can restrict the search depth (not to be mixed up with the -depth option!)
http://www.gnu.org/software/findutils/manual/html_mono/find.html
Lust but not least you could use Perl and File::Find which offers you the biggest flexibilty in searching for files easily.
http://search.cpan.org/search?query=File%3A%3AFind&mode=all
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-09-2005 09:59 PM
тАО01-09-2005 09:59 PM
Re: About the "find" comand
find /tmp -mtime +10 -type f -exec ls -lt {}\;
you can also include -xdev option to search files only in the particular mount point.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2005 05:37 AM
тАО01-11-2005 05:37 AM
Re: About the "find" comand
I've been using something similiar for a few years: at midnight, my crontab runs a script that calls find:
find /home/zorn -type f -exec ll -o {} \; > /home/zorn/Zfiles
When I need to find a file, I just grep Zfiles.
You could easily have this run off /home.
For finding system files, I use
find /bin /etc /lib /opt /sbin /usr /var -type f -name $1 -exec ll {} \;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2005 06:17 AM
тАО01-11-2005 06:17 AM
Re: About the "find" comand
How about a....
find /tmp/* -prune -mtime +10 -exec ls -lt {} \;
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2005 06:28 AM
тАО01-11-2005 06:28 AM
Re: About the "find" comand
find /tmp -type f -path "/tmp/*" -prune -print
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2005 06:35 AM
тАО01-11-2005 06:35 AM
Re: About the "find" comand
try "-only" option with find,
find /tmp -only -mtime +10 -exec ls -lt {} \;
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-12-2005 10:59 PM
тАО01-12-2005 10:59 PM
Re: About the "find" comand
For steps how to assign points see:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33