Skip to main content

14.6) Using "tar" With Wildcards


You can use the wildcard expressions to collect the files more easily:

tar –cvf name.tar file*

The incredible thing about the tar command is that it is not limited to files. It will collect whole directory trees and all the files contained in the tree as well in just one command. And when you extract from the tar file it not only brings out the files but it will also bring out the directory tree and reproduces that as well wherever you extract.