SUMMARY: 64 bits version of the find command

From: Bousquet Francois (Francois.Bousquet_at_cgi.com)
Date: 01/26/05

  • Next message: Cohen, Laurence: "Inaccurate file size for large files"
    Date: Wed, 26 Jan 2005 13:46:18 -0500
    To: "Mailing List - SunManagers (E-mail)" <sunmanagers@sunmanagers.org>
    
    

    I finally solve my problem :

    The problem is the /proc pseudo file system which may contain some 64 bits
    process information. These files can't be accessed by the default find
    command available in Solaris 7. This explain the following error message.
    find: cannot open /: Value too large for defined data type

    find misses a exclude options, so it is not possible to prevent it from
    scanning the /proc file system. The only things that may be done are to
    grep the output or use the fstype ufs options, but these options will not
    prevent find to scan /proc but only not return any of its content. find
    was then still scanning /proc and getting an error.

    I then manage to get the source of GNU find @
    http://www.gnu.org/software/findutils/findutils.html

    and then compile find for sparc 64 bits with gcc 3.3

    The new find 64 bits command is now able to scan everything.

    Some errors may output in /proc, but these error are only related to unlink
    files. So I am using 2>/dev/null after the find command to prevent this.

    -----Original Message-----
    From: Bousquet Francois [mailto:Francois.Bousquet@cgi.com]
    Sent: January 21, 2005 11:11 AM
    To: Mailing List - SunManagers (E-mail)
    Subject: 64 bits version of the find command

    I am trying to run a script that is doing a find for suid and guid files on
    a system.

    Basically I am using this command :

    find / -perm 4000 -print

    On one of my server (E450 with Solaris 7) this command returns an error :
    # find / -perm 4000 -print
    find: cannot open /: Value too large for defined data type
    #

    I have investigate the problem a bit more and found that it is /proc the
    problem
    # find /proc -perm 4000 -print
    find: cannot open /proc: Value too large for defined data type
    #

    I also found this bug ID 4638523
    http://sunsolve.sun.com/search/document.do?assetkey=1-1-4638523-1&searchclau
    se=%22Value%20too%20large%20for%20defined%20data%20type%22%20%20%20find

    The conclusion is proposing a script : find / ! \( -name proc -prune \) to
    solve the problem. But it is buggy, as it will exclude proc files or
    directory on a deep directory tree (ex : /opt/application/proc).

    So I am trying to find a 64 bits version of find for Solaris 7.
    These are the only 64 bits command I can find :

    # ls -l /usr/bin/sparcv9
    total 1380
    -r-xr-xr-x 1 bin bin 192488 Jun 29 1999 adb
    -r-xr-xr-x 1 bin bin 19640 Sep 1 1998 gcore
    -r-xr-sr-x 1 bin sys 15480 Sep 1 1998 ipcs
    -r-xr-xr-x 1 bin bin 27296 Sep 1 1998 kgmon
    -r-xr-xr-x 1 bin bin 23184 Sep 1 1998 ls
    -r-xr-xr-x 1 bin bin 14584 Sep 1 1998 plimit
    -r-xr-xr-x 1 bin bin 81536 Sep 1 1998 prex
    -r-sr-xr-x 1 root sys 36456 Sep 1 1998 ps
    -r-xr-xr-x 1 bin bin 17168 May 20 1999 pvs
    -r-xr-xr-x 1 bin bin 16360 Jun 29 1999 savecore
    -r-xr-xr-x 1 bin bin 11744 Sep 1 1998 setuname
    -r-xr-xr-x 1 bin bin 11840 Sep 1 1998 tnfxtract
    -r-xr-xr-x 1 bin bin 178408 Jun 29 1999 truss
    -r-sr-xr-x 2 root bin 15584 Sep 1 1998 uptime
    -r-sr-xr-x 2 root bin 15584 Sep 1 1998 w
    #

    Anyone know where I can find a 64 bits version of find ?

    Frangois Bousquet
    Counselor - Unix System Administrator
    INET - Internet Maintenance
    CGI - LBC Services
    Email : Francois.Bousquet@CGI.com
    _______________________________________________
    sunmanagers mailing list
    sunmanagers@sunmanagers.org
    http://www.sunmanagers.org/mailman/listinfo/sunmanagers
    _______________________________________________
    sunmanagers mailing list
    sunmanagers@sunmanagers.org
    http://www.sunmanagers.org/mailman/listinfo/sunmanagers


  • Next message: Cohen, Laurence: "Inaccurate file size for large files"

    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)