Unix: command for sudo-mv-chown combo?

I work as sudo on a system where I mv a huge number of files and channels back and forth. Is there a team for combos?

$ sudo -i; # mv hello /home/other; # chown -R other:other /home/other/hello
+3
source share
3 answers

Try the command install(options -o, -gand -m).

+8
source

Something like that?

david@pcdavid:~$ cat zz
whoami
david@pcdavid:~$ sudo -i "cd /home/david; mv zz yy; chown root yy; sh yy"
root
0
source

Put these commands in a shell script and run the script with sudo.

0
source

Source: https://habr.com/ru/post/1747027/


All Articles