How to make tar cf xxx.tar * to include hidden files such as .htaccess?

Discussion in 'Site & Server Administration' started by yangyang, Apr 30, 2008.

  1. #1
    Looked it over and over in the search engines but got no answer. Does it have a switch to do this?

    Would zip do?

    And a bonus question (lol~) for you: what's .alias for?


    Thanks!
     
    yangyang, Apr 30, 2008 IP
  2. twhiting9275

    twhiting9275 Active Member

    Messages:
    305
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    80
    #2
    Here's a quick way to do this:
    Instead of compressing in public_html (ie: tar zcpf *), do this instead:
    tar zcpf /home/user/public_html.tgz /home/user/public_html/

    This will include all .files and all files, in the public_html directory
    .alias is usually an environment or alias storage file. It is typically environment specific, so may not work in all shells . True geeks store things in more than one file though, heh :p
     
    twhiting9275, Apr 30, 2008 IP
  3. yangyang

    yangyang Banned

    Messages:
    757
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks twhiting.

    tar zcpf *.tgz * is a good trick! =)
     
    yangyang, May 1, 2008 IP