-
昨天
from datetime import date, timedelta yesterday = (date.today() + timedelta(days=-1)).strftime("%Y-%m-%d") print(yesterday)
今天

明天
from datetime import date, timedelta tomorrow = (date.today() + timedelta(days= 1)).strftime("%Y-%m-%d") print(tomorrow)
[itadmin@dlidcimageapp1 ~]$ pstree |grep python
|-bash—python—bash—find
|-bash—python—bash
[itadmin@dlidcimageapp1 ~]$ ps -ef|grep find
itadmin 15989 13688 0 14:09 pts/2 00:00:00 grep find
itadmin 21185 20866 0 2021 pts/1 00:00:32 find / -name 20210909
[itadmin@dlidcimageapp1 ~]$ ps -ef|grep python
luci 5357 1 0 2021 ? 00:39:55 /usr/bin/python -Es /usr/sbin/luci serve --daemon --user luci --group luci --log-file=/var/log/luci/luci.log --pid-file=/var/run/luci/luci.pid --server-name=init --app-name=init /var/lib/luci/etc/luci.ini INITPID=5128
itadmin 16071 13688 0 14:09 pts/2 00:00:00 grep python
itadmin 20865 20864 0 2021 ? 21:33:43 python -c import pty; pty.spawn("/bin/bash")
itadmin 23920 23917 0 2021 ? 21:33:42 python -c import pty; pty.spawn("/bin/bash")
[itadmin@dlidcimageapp1 ~]$ ps -ef|grep 21185
itadmin 16421 13688 0 14:10 pts/2 00:00:00 grep 21185
itadmin 21185 20866 0 2021 pts/1 00:00:32 find / -name 20210909
[itadmin@dlidcimageapp1 ~]$ ps -ef|grep 20866
itadmin 16454 13688 0 14:10 pts/2 00:00:00 grep 20866
itadmin 20866 20865 0 2021 pts/1 00:00:00 /bin/bash
itadmin 21185 20866 0 2021 pts/1 00:00:32 find / -name 20210909
[itadmin@dlidcimageapp1 ~]$ ps -ef|grep 20865
itadmin 16482 13688 0 14:10 pts/2 00:00:00 grep 20865
itadmin 20865 20864 0 2021 ? 21:35:10 python -c import pty; pty.spawn("/bin/bash")
itadmin 20866 20865 0 2021 pts/1 00:00:00 /bin/bash
[itadmin@dlidcimageapp2 ~]$ ps -ef|grep find
itadmin 24544 23684 0 14:16 pts/6 00:00:00 grep find
itadmin 25269 5371 0 2021 ? 02:32:46 find / -name 20210909133748_temp_img_2021991631165868947.jsp
[itadmin@dlidcimageapp2 ~]$ ps -ef|grep find
itadmin 24605 23684 0 14:16 pts/6 00:00:00 grep find
[itadmin@dlidcimageapp2 ~]$ ps -ef|grep python
luci 5426 1 0 2021 ? 00:36:40 /usr/bin/python -Es /usr/sbin/luci serve --daemon --user luci --group luci --log-file=/var/log/luci/luci.log --pid-file=/var/run/luci/luci.pid --server-name=init --app-name=init /var/lib/luci/etc/luci.ini INITPID=5192
itadmin 21795 21794 0 2021 ? 00:00:00 python -c import pty; pty.spawn("/bin/bash")
itadmin 21883 1 99 2021 ? 222-20:28:42 python -c import pty; pty.spawn("/bin/bash")
itadmin 24623 23684 0 14:16 pts/6 00:00:00 grep python
itadmin 24982 24981 0 2021 ? 00:00:00 python -c import pty; pty.spawn("/bin/bash")
[itadmin@dlidcimageapp2 ~]$ ps -ef|grep python
luci 5426 1 0 2021 ? 00:36:40 /usr/bin/python -Es /usr/sbin/luci serve --daemon --user luci --group luci --log-file=/var/log/luci/luci.log --pid-file=/var/run/luci/luci.pid --server-name=init --app-name=init /var/lib/luci/etc/luci.ini INITPID=5192
itadmin 21795 21794 0 2021 ? 00:00:00 python -c import pty; pty.spawn("/bin/bash")
itadmin 21883 1 99 2021 ? 222-20:29:21 python -c import pty; pty.spawn("/bin/bash")
itadmin 24829 23684 0 14:17 pts/6 00:00:00 grep python
itadmin 24982 24981 0 2021 ? 00:00:00 python -c import pty; pty.spawn("/bin/bash")




