UNIX: Command to compress folder and all files into a tar

I am trying to grab a folder and all the folders and files underneath it and send it from one computer to another. I basically want to compress the whole folder into a tar, tgz, or zip file so that it can be sent as one file. is there a command to compress a folder and all its contents into a tar file in unix?

looking for

tar cvf

?

yes i have tried "tar" command with filename but it tells me this:

Tar: blocking factor must be specified with "b" function modifer
Usage: (lists a bunch of modifers)

i do not know what modifer i need in order to compress both the folder and all its contents.

ive also tried what you suggested and it tells me i need a file name... but i have included the file name with that command.

What OS are you using?

Commands have different flags based on the OS.

sun solaris 8

atleast on linux its as simple as

tar cvf <expected_filename_for_tar_with_dot_tar_extn> <directory>

To also gzip /path/to/somedir with GNU tar use:

cd /path/to
tar zcvf /var/tmp/somedir.tgz somedir

Otherwise:

cd /path/to
tar cvf - somedir | gzip > /var/tmp/somedir.tgz

sweet thanks got it to work although it took forever. now i am having issues sending it via sunforum to netmeeting because the file is over 5 gigs :confused:
is there anyway i can map a network hard drive into unix so i can move files into the network hard drive from the unix box.