Zip or tar certian directories via SSH?

Discussion in 'Site & Server Administration' started by Nintendo, Dec 24, 2009.

  1. #1
    is there a way to zip or tar just certain directories? Instead of only one? For example, for zip there is...

    zip -r filename.zip foldername/

    But say you're at public_html of the domain and there are four folders you wanna zip, at the same time in to one file, named /fee/, /fi/, /fo/, and /fum/. Is there a way to specify those directories and zip or tar just those four directories instead of doing the whole site or just one directory at a time??
     
    Nintendo, Dec 24, 2009 IP
  2. new

    new Peon

    Messages:
    1,433
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Nintendo asking a serious question :eek:

    anyway let me have the honor to help you :)

    I guess this will do (while under public_html)

    tar -cf backup.tar /fee /foo /fi /sigh 
    Code (markup):
     
    Last edited: Dec 25, 2009
    new, Dec 25, 2009 IP
    Nintendo likes this.