#1
  1. No one Important
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2000
    Location
    Australia
    Posts
    524
    Rep Power
    15

    Newbie :: Very Easy Question- Creating a zip/tar file


    Hello there,

    I feel so stupid asking this question, but I would like to know what commands I need to type to get my FreeBSD system to create a recursive zip/tar file...

    I need to create the zip/tar file on the system them FTP and unzip with the directory structure onto a windows machine....

    Can someone please help me??

    Cheers
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Posts
    4
    Rep Power
    0
    Just cd to the parent dir where you want its dir tree to be tar'ed up then issue this command:

    To tar up /var/log, for example:

    cd /var
    tar zfc backup.tar.gz log

    To create zip archive you need to install /usr/ports/archivers/zip.

    BTW, you do not need to specify Newbie :: Very Easy Question- in your subject. You'd get flamed (especially by me) if you do this in other forums.
  4. #3
  5. No one Important
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2000
    Location
    Australia
    Posts
    524
    Rep Power
    15
    Hey there thanks for that.....

    What option would I use on a solarus box? tried the

    tar zfc backup.tar.gz log

    But it does not like the z option... would you know what to use there?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Posts
    4
    Rep Power
    0
    Sorry I don't run Solaris so you will have to RTFM on man 1 tar to find out the equivalent.
  8. #5
  9. funky munky
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jul 2001
    Location
    UK
    Posts
    1,446
    Rep Power
    16
    What option would I use on a solarus box? tried the

    tar zfc backup.tar.gz log
    Perhaps you need to pipe the output from the tar command to a gzip command? I'm no sysadmin, but maybe something like:

    Code:
    tar cvf log | gzip > backup.tar.gz
    Don't blame me if this doesn't work - backup first! Also search the web, especially google.com (cf http://www.google.com/search?sourcei...z+solaris+unix).

IMN logo majestic logo threadwatch logo seochat tools logo