tar 停止并显示“无法统计:没有此文件或目录”

tar 停止并显示“无法统计:没有此文件或目录”

tarf抱怨找不到存在且我具有权限的目录。我见过许多类似的问题,但所有问题都与选项不在输出文件之前有关。这里不是这种情况。

gauthier@ionian:~ $ ls -l | grep cpdata
drwxrwxr-x   2 gauthier gauthier     4096 May 23 14:35 cpdata
-rw-rw-r--   1 gauthier gauthier 17609833 May 23 14:43 cpdata.tar.gz
gauthier@ionian:~ $ echo $HOME
/home/gauthier
gauthier@ionian:~ $ sudo tar -cvzf ~/cpd.tar.gz ~/cpdata​
tar: Removing leading `/' from member names
tar: /home/gauthier/cpdata​: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
gauthier@ionian:~ $ tar --version
tar (GNU tar) 1.27.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
gauthier@ionian:~ $ pwd
/home/gauthier

目录内容及更多内容:

gauthier@ionian:~ $ ls -l cpdata
total 45964
-rw-rw-r-- 1 gauthier gauthier    18507 Jun  3 21:27 cpconf.tar.gz
-rw-rw-r-- 1 gauthier gauthier 16469156 Jun  3 21:27 cplogs.tar.gz
-rw-r----- 1 gauthier gauthier    63227 Jun  3 21:28 dmesg
-rw-r----- 1 gauthier gauthier    61823 Jun  3 21:28 dmesg.0
-rw-r----- 1 gauthier gauthier    16725 Jun  3 21:28 dmesg.1.gz
-rw-r----- 1 gauthier gauthier    16878 Jun  3 21:28 dmesg.2.gz
-rw-r----- 1 gauthier gauthier    17096 Jun  3 21:28 dmesg.3.gz
-rw-r----- 1 gauthier gauthier    15672 Jun  3 21:28 dmesg.4.gz
-rw-rw-r-- 1 gauthier gauthier     4606 Jun  3 21:29 inotify-list.txt
-rw-r--r-- 1 gauthier gauthier      554 Jun  3 21:28 install.vars
-rw-rw-r-- 1 gauthier gauthier 16469156 Jun  3 21:27 java-cpdir-logs.tar.gz
-rw-rw-r-- 1 gauthier gauthier        0 Jun  3 21:28 java-os-version.txt
-rw-rw-r-- 1 gauthier gauthier       66 Jun  3 21:28 java-os-whereis.txt
-rw-rw-r-- 1 gauthier gauthier       45 Jun  3 21:26 java-var-logs.tar.gz
-rw-r----- 1 gauthier gauthier    10492 Jun  3 21:28 kern.log
-rw-r----- 1 gauthier gauthier   202535 Jun  3 21:28 kern.log.1
-rw-r----- 1 gauthier gauthier     6320 Jun  3 21:28 kern.log.2.gz
-rw-r----- 1 gauthier gauthier    23244 Jun  3 21:28 kern.log.3.gz
-rw-r----- 1 gauthier gauthier     2970 Jun  3 21:28 kern.log.4.gz
-rw-rw-r-- 1 gauthier gauthier 13381734 Jun  3 21:29 lsof-list.txt
-rw-rw-r-- 1 gauthier gauthier    24594 Jun  3 21:28 ps-list.txt
-rw-r----- 1 gauthier gauthier    27381 Jun  3 21:27 syslog
-rw-r----- 1 gauthier gauthier    66630 Jun  3 21:27 syslog.1
-rw-r----- 1 gauthier gauthier     6816 Jun  3 21:27 syslog.2.gz
-rw-r----- 1 gauthier gauthier     5268 Jun  3 21:27 syslog.3.gz
-rw-r----- 1 gauthier gauthier    58584 Jun  3 21:27 syslog.4.gz
-rw-r----- 1 gauthier gauthier     5729 Jun  3 21:27 syslog.5.gz
-rw-r----- 1 gauthier gauthier     4866 Jun  3 21:27 syslog.6.gz
-rw-r----- 1 gauthier gauthier     8601 Jun  3 21:27 syslog.7.gz
-rw-rw-r-- 1 gauthier gauthier      105 Jun  3 21:28 uname-all.txt
gauthier@ionian:~ $ ls -l | grep cpdata
drwxrwxr-x   2 gauthier gauthier     4096 Jun  3 21:29 cpdata
-rw-rw-r--   1 gauthier gauthier 34586144 Jun  3 21:30 cpdata.tar.gz

同样有趣的是:我可以从 nautilus 中的上下文菜单中生成 tar!

相关内容