LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-24-2005, 02:48 AM   #1
david.dales
Member
 
Registered: Aug 2005
Location: Hamburg, Germany
Posts: 39

Rep: Reputation: 15
How can I exclude NFS with find with no visit


Ok, I am having a problem with the HP-UX find command, no suprise there. First, installing a capable find "not the version that is included with the distro" is not an option in this case.

I am using a find command to build a file list to be backed up to tape. I also have an NFS mounted filesystem that sometimes hangs. I'm not yet quite sure why but that's another issue.

When the find runs and the NFS mount is hung, the find hangs as well.

-fsonly, -only, -fstype, -prune, etc..... all "visit" the NFS mount then disregard it according to the switches and the values provided.

I have searched and searched for a way to exclude NFS filesystems from the find without "visiting" the NFS mount without any luck so far.

Unmounting would be an easy fix of course but the customer doesn't want to do that and the process has to be done at night with no interaction.

Any suggestions would be greatly appreciated.

Thanks in advance
 
Old 08-24-2005, 02:58 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I have two possible ideas. 1) Use several find commands and redirect the output of each command to add to the same file ( >> ).
2) In the script that uses the find command, remount an empty directory over the NFS mount point before using the find command.
 
Old 08-24-2005, 03:08 AM   #3
david.dales
Member
 
Registered: Aug 2005
Location: Hamburg, Germany
Posts: 39

Original Poster
Rep: Reputation: 15
The problem is, the find switches will still "visit and read" the NFS mount.

Also, if the NFS mount is healthy, they want it to be included with the backup.

I was considering changing the script to check the NFS mount for health.

if i can read the mount do
run find normally
if not
unmount the nfs if I can
if can't unmount
do something different
fi

However, my customer wants to use the GUI options for the find that are built in to the software that they are using. Basically it's an interface with check boxes for find options that they can clickity-click.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using find and grep - how to exclude a result ? graziano1968 Linux - General 13 12-04-2010 10:02 PM
Need help with NFS, can't find what I need in the man pages... NoeticRapture Slackware 12 03-31-2010 10:37 PM
tar --exclude --exclude-from cefn Linux - Software 4 10-11-2005 07:31 PM
exclude directory from find ebasi Linux - Software 8 07-17-2004 02:12 AM
Find A Nfs Share? quadamage76 Linux - Networking 3 04-21-2004 09:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration