Zaza
Zaza

Reputation: 488

creating file using install with preset user and group

Trying to create a file with preset user and users group

missing destination file operand after

install -m 644 -o root -g root /var/test/file

getting an error:

install: missing destination file operand after ‘/var/test/file’
Try 'install --help' for more information.

Note: does work fine for directory creation, with -d but not for files...

Upvotes: 0

Views: 91

Answers (1)

Eric Fournie
Eric Fournie

Reputation: 1372

install needs a destination operand when used with a file. If you want to install /var/test/file in the current directory, use:

install -m 644 -o root -g root /var/test/file .

Upvotes: 1

Related Questions