Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    156
    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:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,664
    Likes Received:
    69
    Trophy Points:
    203
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    find /home/* |grep tar.gz
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,470
    Likes Received:
    21
    Trophy Points:
    463
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice