我想使用tar命令使用NFS服务器从硬盘备份到磁带驱动器,但是我收到错误消息
$ tar -czf /dev/st0 /media/seagate expansion drive/disk/file/
tar:/media/seagate :cannot stat:no such file or directory
tar: expansion :cannot stat:no such file or directory
tar: drive/disk/file/ :cannot stat:no such file or directory
tar: error exit delayed from previous error
此致 S K
答案 0 :(得分:2)
tar -czf /dev/st0 /media/seagate expansion drive/disk/file/
当给出上述命令时,shell将/media/seagate
和expansion
以及drive/disk/file/
视为单独的参数,因此tar
将它们视为不同的文件/目录。如果它是单个文件,请用引号括起来,如
tar -czf /dev/st0/file.tar.gz "/media/seagate expansion drive/disk/file/"
修正了tar文件名