tar解压报错:tar: Exiting with failure status due to previous

在/home/xxx/...目录下,解压xxx.tar.bz2文件

tar -jxvf xxx.tar.bz2 -C ./

报错:

tar: Exiting with failure status due to previous

 

解决办法:

网上找到的帖子说是因为没有权限,加上sudo,或者切root

tar Cannot open: File exists

tar: Exiting with failure status due to previous errors

 

查了一下源目录的属性,发现该目录要求owner,group, others都要有读写和执行权限

 

再看该目录,原来others没有写权限

#ls -ld .
drwxr-xr-x 2 root root 4096 2011-05-20 10:02 .

按照下面修改就可以了

#chmod 777 .
# ls -ld .
drwxrwxrwx 2 root root 4096 2011-05-20 10:02 .
 

你可能感兴趣的:(linux学习笔记,Ubuntu下的操作)