lkml.org 
[lkml]   [1998]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Directory name problem...
    On Mon, 26 Oct 1998, CaT wrote:

    > Joe wrote the following:
    > >
    > > Riley,
    > > I admin a machine, and do the same thing to wipe out cores every
    > > day. However, all i use is the following line in my root crontab:
    > >
    > > 0 6 * * * find / -name core -exec rm {} ';'
    >
    > I think you may find:
    >
    > find / -type f -name core -exec rm {} ';'
    >
    > to do exactly what you want.
    >
    > The -type f tells it to only look at files and as such you wont
    > be relying on error reporting from rm.

    Another advantage of using -type f will be seen if someone creates a
    symlink from the "core" file to a critical system file. -type f means a
    "real file" and symlinks are excluded as well as directories and /dev
    files.

    john alvord


    Music, Management, Poetry and more...
    http://www.candlelist.org/kuilema

    Cheap CDs @ http://www.cruzio.com/~billpeet/MusicByCandlelight





    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:45    [W:0.030 / U:0.400 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site