root@calleva:/var/spool/cron/atjobs# echo "sleep 3000" | at 20:58
warning: commands will be executed using /bin/sh
job 161 at Sat Jun 3 20:58:00 2023
root@calleva:/var/spool/cron/atjobs# ls
a000a101acba0e
root@calleva:/var/spool/cron/atjobs# cat a000a101acba0e
#!/bin/sh
# atrun uid=0 gid=0
# mail root 0
umask 22
LANGUAGE=en_GB:en; export LANGUAGE
PWD=/var/spool/cron/atjobs; export PWD
LOGNAME=root; export LOGNAME
XDG_SESSION_TYPE=tty; export XDG_SESSION_TYPE
MOTD_SHOWN=pam; export MOTD_SHOWN
HOME=/root; export HOME
LANG=en_GB.UTF-8; export LANG
SSH_CONNECTION=192.168.0.12\ 60848\ 192.168.0.113\ 22; export SSH_CONNECTION
XDG_SESSION_CLASS=user; export XDG_SESSION_CLASS
USER=root; export USER
SHLVL=0; export SHLVL
XDG_SESSION_ID=1202; export XDG_SESSION_ID
XDG_RUNTIME_DIR=/run/user/0; export XDG_RUNTIME_DIR
SSH_CLIENT=192.168.0.12\ 60848\ 22; export SSH_CLIENT
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.dotnet/tools:/root/bin:/opt/mssql-tools/bin:/usr/games; export PATH
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/0/bus; export DBUS_SESSION_BUS_ADDRESS
SSH_TTY=/dev/pts/5; export SSH_TTY
OLDPWD=/root; export OLDPWD
cd /var/spool/cron/atjobs || {
echo 'Execution directory inaccessible' >&2
exit 1
}
sleep 3000
root@calleva:/var/spool/cron/atjobs# atq
161 Sat Jun 3 20:58:00 2023 a root
root@calleva:/var/spool/cron/atjobs#
有没有办法告诉该文件a000a101acba0e
对应于队列项161
?
翻阅我们找到的来源
所以
a000a101acba0e
是从a
对于“在”000a1
对于十六进制的作业编号 161。检查echo $((16#00a1))
01acba0e
运行作业的时间,自纪元以来的分钟数。检查echo "obase=16;$(date +%s)/60" | bc
。