Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
开发者_StackOverflow Improve this questionI want to tar the directory /opt/mydir into a directory /opt/myprefix/mydir
how can I do that with tar command? (solaris)
thanks
Create a symlink so that you can access /opt/mydir as /opt/myprefix/mydir
cd /opt
ln -s . myprefix
Then tar it:
tar -cvf mytar.tar /opt/myprefix/mydir
精彩评论