The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Shell command question - search

Discussion in 'General Discussion' started by Shrek, Mar 22, 2005.

  1. Shrek

    Shrek Active Member

    Joined:
    Sep 6, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Arkansas, USA
    Hello.
    I am trying to figure out how to find cpanel backups in a users account.
    Not the backups in /backup
    I am thinking it would be something like grep backup.tar.gz /home

    But it didn't work.
    Any help is appreciated and yes... I am looking in my books but just haven't found the right command yet.
    Do I need to cd to the /home directory and just grep .tar.gz or ???
    Thank you for any advice/instructions
    :cool:
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    find /home/* |grep tar.gz
     
  3. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Or if the file is likely 24 hours old or more you can get a much quicker response form:

    locate tar.gz | grep home
     
  4. __arjun__

    __arjun__ Guest

    Another solution:

    find /home -maxdepth 2 -iname 'backup*'

    This is faster than

    find /home/* |grep tar.gz


    Because Cpanel creates backup directly under users home directory,
    there is no need to further descend :)
     
Loading...

Share This Page