Creating a .tar.gz Archive

I am logged in to a redhat 7.3 server through SSH as root, and want to make a tar.gz archive of the contence of the directory, and out put it to /home/admin/file.tar.gz

At “[root@stella www]#” I type “tar -czf /home/admin/file.tar.gz”
and get the following:
tar: Cowardly refusing to create an empty archive

Anyone have any ideas? the follder www has several folders, and files in it, and i need to back it up to my computer. (i know nothing about linux).

not at home to test it right now, but shouldnt you have the tar work in a fashion that the path to the files to archive is listed first, and then the place to output them is next? just a thought…i cant remember off the top of my head. doh, looks like i just wrote that backwards.

according to that, try tar -cvf /home/admin/file.tar.gz .

the . is important ! just like a copy command :wink:

thanks i think the “.” is what was misssing :slight_smile:

i got harped on about that so many times that the . is ingrained :wink: