Portál AbcLinuxu, 19. dubna 2024 12:06
$ man su ... -c, --commmand=COMMAND pass a single COMMAND to the shell with -c ...
su user -c "mkdir dir"?
deb http://ftp.cz.debian.org/debian jessie main contrib non-free
su user -c "mdir dir;mkdir dir2"nebo dokonce
su user -c "./druhy_skript.sh"Kde druhy_skript.sh bude skript pro toho tveho uzivatele?
deb http://ftp.cz.debian.org/debian jessie main contrib non-free
deb http://ftp.cz.debian.org/debian jessie main contrib non-free
#!/bin/bash function funkce() { echo blabla } su user -c funkce...ale nefunguje
deb http://ftp.cz.debian.org/debian jessie main contrib non-free
bash(1)
:
If the shell is started with the effective user (group) id not equal to the real user (group) id, and the -p option is not supplied, no startup files are read, shell functions are not inherited from the environment, the SHELLOPTS variable, if it appears in the environment, is ignored, and the effective user id is set to the real user id. If the -p option is supplied at invocation, the startup behavior is the same, but the effective user id is not reset.
cat << ENDOFUSERSCRIPT | su user ... ... ... ENDOFUSERSCRIPT... a žiadne blbé poznámky o
cat
, prosím
Ake blbe poznamky by mohli byt?
Ved je to krasne, take... poeticke.logout
. To by Ti také nešlo?
sudo
?
Tiskni Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.