[HPADM] find with prune command help

From: Cruz, Alfredo (Alfredo.Cruz_at_cancercare.on.ca)
Date: 10/26/03

  • Next message: Hustert Klaus-CKH035: "[HPADM] SUMMARY: wu_ftp on 10.20 and ls in the ftp"
    To: "'hpux-admin@dutchworks.nl'" <hpux-admin@DutchWorks.nl>
    Date: Sat, 25 Oct 2003 18:31:53 -0400
    
    

    Hi,
     
    I'm having trouble getting my find command to work with the -prune option.
    What I basically want to do is find *.log on a mounted file system but
    exclude the directory /<filesystem>.snapshot. When I ran the command, it
    still goes to the .snapshot directory which is something I don't want to
    happen. The .snapshot directory is a feature of Network Appliance NAS
    server which are created for each mounted file systems. It contains
    snapshots of the directories and files for the file system. The .snapshot
    could have been just a regular subdirectories and the find command still
    doesn't work.
     
    The command I used is:
    find /<filesystem> -name "*.log" -print -name ".snapshot" -exec rm {} \;
     
    I even tried but this didn't work either:
     
    find /<filesystem> -name "*.log" -print -path /<filesystem>/.snapshot -exec
    rm {} \;
     
    Any suggestions?
     
    Thanks,
     
    Alfredo

    This e-mail message (and any attachments) may contain confidential and/or
    privileged information for the sole use of the intended recipient. Any
    review or distribution by anyone other than the person for whom it was
    originally intended is strictly prohibited. If you have received this e-mail
    in error, please contact the sender and delete all copies. Opinions,
    conclusions or other information contained in this e-mail may not be that of
    the organization.

    --
                 ---> Please post QUESTIONS and SUMMARIES only!! <---
            To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
           Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
     
     Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
                http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)
    

  • Next message: Hustert Klaus-CKH035: "[HPADM] SUMMARY: wu_ftp on 10.20 and ls in the ftp"

    Relevant Pages

    • Re: partition naming - newbie
      ... hardware address that is assigned to each disk, tape, or CD-ROM. ... Using the prtconf command ... In addition to managing these directories, the devfsadm command also ... Berkeley fast file system. ...
      (comp.unix.solaris)
    • Re: Trying to move /usr - Fixed
      ... After thinking about that mv command, ... Note /dev/ad8s1e is an empty partition (a new disk, ... I'll use user and usrdemo as the names of the ... the root of the file system. ...
      (freebsd-questions)
    • RE: serioup problem after running fsck
      ... I'm not an expert in recovery and I'm not sure you could recover at ... > The easiest and first thing is to run fsck again (although I ... Running it once is no guarantee that the file system ... > shutdown command from the command line or the shutdown menu ...
      (RedHat)
    • coreutils-7.3 released [stable]
      ... been a few other interesting fixes and improvements. ... run a command like this: ... sort -m no longer segfaults when its output file is also an input file. ... destination file system with a fundamental block size of 4KiB or greater. ...
      (gnu.announce)
    • Re: Simple questions about building C program
      ... Library/Object system, and not the unix-y IFS, where my files are. ... file system as well as others such as "root" and QOpenSys that behave more like a Unix file system. ... The CRTCMOD command allows LIB/FILE/MEMBER source input file SRCFILE and SRCMBR parameters. ... So one option might be to FTP your script into a database file/member, to enable direct input to a command such as SBMDBJOB or CRTCLPGM. ...
      (comp.sys.ibm.as400.misc)

  • Quantcast