1

Where/how can I clear the at commands log on my system, if one exists?

job 102 at Wed Nov 25 09:37:00 2020

I imagine that after awhile these should be cleared somehow...

How would one do this assuming there are no pending jobs, as well as assuming there are pending jobs?

Thanks!

Vellutante
  • 15
  • 4
  • Is the atd daemon running? – A.B Nov 25 '20 at 18:12
  • Yes, the atd daemon is running. – Vellutante Nov 25 '20 at 18:13
  • Are you only concerned by the fact the next time you will submit an at job it will be numbered 103, or by the fact that once the job is over it's still displayed somehow with atq? – A.B Nov 25 '20 at 18:19
  • What do you mean by clearing the log? – Kusalananda Nov 25 '20 at 18:24
  • I am concerned that it will be numbered 103. @Kusalananda I am new to using it so I don't know if it is something that should be cleared away periodically, like clearing a cache. – Vellutante Nov 25 '20 at 18:33
  • 1
    That's just a counter. It does not use up any resources whatsoever. – Kusalananda Nov 25 '20 at 18:33
  • @Kusalananda Thanks. – Vellutante Nov 25 '20 at 18:37
  • Is logrotate running? – waltinator Nov 26 '20 at 01:09
  • 1
    Jobs survive restarts and reboots: it would be a serious issue if they did not. So resetting the numbering for existing jobs could be undesirable. I would certainly not recommend resetting the counter to a lower value while there were any existing jobs: that could result in the re-use of job numbers. – Paul_Pedant Nov 26 '20 at 16:35
  • Appreciate the replies. @waltinator I have never used it, and it isn't a process that I could find, so I would say no. After looking at what it actually is, it appears to be something beyond my current comprehension. – Vellutante Nov 26 '20 at 21:49

1 Answers1

1

Presumably it may vary between distros, but on my Linux Mint 18.1:

paul-RV415-RV515 atjobs # pwd
/var/spool/cron/atjobs
paul-RV415-RV515 atjobs # ls -l .SEQ
-rw------- 1 daemon daemon 6 Nov 26 10:28 .SEQ
paul-RV415-RV515 atjobs # cat .SEQ
000b7
paul-RV415-RV515 atjobs # 

Hex b7 is 183, which is my last at job number used.

As there is no obvious way to relate that to a specific user, it seems to imply that all users share the same atq job number sequence. That seems surprising.

Duplicate on StackExchange

Paul_Pedant
  • 8,679