July 24th, 2012, 04:43 PM
Usage of tar
After searching for awhile I am not sure about the usage of tar. I want to create an archive that will retain its structure of directories and subdirectories. I have a directory named wordpress that contains files and well as other directories. Please tell me if this command is correct:
Usually I use the -R or -r flag for recursion. Do I need the -R flag here?
Last edited by epanagio; July 24th, 2012 at 04:47 PM.
July 24th, 2012, 09:12 PM
If the source for the tar is a directory then that directory, plus contents will be included in the archive. Thus your syntax is correct, assuming that you will be in the correct directory when the command is issued (the directory that contains the named directory).
The moon on the one hand, the dawn on the other:
The moon is my sister, the dawn is my brother.
The moon on my left and the dawn on my right.
My brother, good morning: my sister, good night.
-- Hilaire Belloc