开发者

shell script to extract tar file please help

I have created a shell script (.sh) to extract a tar file. Below is the code:

tar -xvwf 1.0.1.tar

But when the script runs and start to extracting the tar, it asks confirmation in each file extract.

extract `1.0.1'?

How can I avoid that in my script? I'm running on Linux开发者_开发百科.


Just tar xvf 1.0.1.tar should do the trick; the -w options means "ask for confirmation for every action" (tar(1)).


Remove the -w option, which specifically asks it to confirm on every file. From the tar man page:

 -w, --interactive, --confirmation
       ask for confirmation for every action
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜