command for tar'ing multiple sub-directories into a single tar file
Hello,
I'm trying to move an entire subdirectory with it's associated files and subdirectories from one server to another using scp. I'm told one way to do this is to tar the subdirectory into a single .tar file.
I've seen examples of the command to tar up multiple single files into a single .tar file. I've not seen an example of how to do this to a full subdirectory and it's associated subdirectories into a single .tar file.
for example, if I wanted to tar a subdirectory called /main and all its subdirectories and files into a single file called main_backup.tar would I execute:
tar -cvf main_backup.tar /main
or
tar -cvf main_backup.tar /main/
or
tar -cvf main_backup.tar /main/*
???
Thanks! I appreciate your time and consideration.
Blaine
|