Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How should I specify paths for files written by tar(1)or bar(1)?

bar files paths specify tar written
0
Posted

How should I specify paths for files written by tar(1)or bar(1)?

0

tarand barare used to archive files to tape, floppy disk, or tar-files. The important thing to remember when creating an archive is to use relative pathnames. This is necessary because when the files are restored, they will be written to the same path that was used to add them to the archive. For this reason, it is best to use relative paths to specify your files. For example, tar cvf /dev/rfd0c /home/u1/myhome/stuff *** wrong!! *** tar cvf /dev/rfd0c ~/stuff *** wrong again!! *** should be: cd tar cvf /dev/rfd0c stuff In this example, the user would be able to extract the tar’d files only into /home/u1/myhome if the archive was created using absolute paths. If the path to the user’s home directory is changed after the archive is created, it is unlikely that the user will be able to extract the files from the archive. The relative path example will allow the user to extract the files into any directory. Note that the SunView file manager must not be running while you are attempting to

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123