尝试使用预设用户和用户组创建文件
之后缺少目标文件操作数
install -m 644 -o root -g root /var/test/file
收到错误:
install: missing destination file operand after ‘/var/test/file’
Try 'install --help' for more information.
注意:对于目录创建,使用-d但不适用于文件...
答案 0 :(得分:1)
install
需要目标操作数。如果要在当前目录中安装/var/test/file
,请使用:
install -m 644 -o root -g root /var/test/file .