Linux auf Befehl Unerwartet verwendbar! Machen Sie sich hier eine Notiz.
Befehlsspezifikation (Ende mit Strg + d)
22:59:18 root@localhost ~ [0] # at 23:30
at> touch 1.txt
at> <EOT>
job 10 at Thu Oct 22 23:30:00 2020
22:59:37 root@localhost ~ [0] #
Warteschlangenanzeige
23:00:59 root@localhost ~ [0] # at -l
10 Thu Oct 22 23:30:00 2020 a root
23:01:00 root@localhost ~ [0] #
Befehlsinhalt anzeigen. Sie sind in den aktuellen Ordner verschoben.
23:01:48 root@localhost ~ [0] # at -c 10
#!/bin/sh
# atrun uid=0 gid=0
# mail root 0
umask 22
XDG_SESSION_ID=16340; export XDG_SESSION_ID
HOSTNAME=localhost; export HOSTNAME
SELINUX_ROLE_REQUESTED=; export SELINUX_ROLE_REQUESTED
SHELL=/bin/bash; export SHELL
HISTSIZE=1000; export HISTSIZE
SELINUX_USE_CURRENT_RANGE=; export SELINUX_USE_CURRENT_RANGE
SSH_TTY=/dev/pts/0; export SSH_TTY
USER=root; export USER
MAIL=/var/spool/mail/root; export MAIL
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin; export PATH
PWD=/root; export PWD
LANG=ja_JP.UTF-8; export LANG
PS1=\\t\ \\u@\\h\ \\w\ [\${PIPESTATUS[@]}]\ \\\$\ ; export PS1
SELINUX_LEVEL_REQUESTED=; export SELINUX_LEVEL_REQUESTED
HISTCONTROL=ignoreboth; export HISTCONTROL
SHLVL=1; export SHLVL
HOME=/root; export HOME
LOGNAME=root; export LOGNAME
LESSOPEN=\|\|/usr/bin/lesspipe.sh\ %s; export LESSOPEN
XDG_RUNTIME_DIR=/run/user/0; export XDG_RUNTIME_DIR
cd /root || {
echo 'Execution directory inaccessible' >&2
exit 1
}
${SHELL:-/bin/sh} << 'marcinDELIMITER54cbc56c'
touch 1.txt
marcinDELIMITER54cbc56c
23:01:53 root@localhost ~ [0] #
Befehl löschen
23:03:58 root@localhost ~ [0] # at -l
10 Thu Oct 22 23:30:00 2020 a root
23:04:06 root@localhost ~ [0] # at -r 10
23:04:11 root@localhost ~ [0] # at -l
23:04:14 root@localhost ~ [0] #
das ist alles.
Recommended Posts