Can I specify multiple directories?

084

No, the -C option in the tar command only allows you to specify a single directory at a time. If you need to extract or create archives in multiple directories, you would need to run separate tar commands for each directory.

For example, if you want to extract an archive to two different directories, you would do:

tar -xvf archive.tar -C /path/to/first_directory
tar -xvf archive.tar -C /path/to/second_directory

Each command changes to the specified directory and performs the extraction there.

0 Comments

no data
Be the first to share your comment!