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!

10
  • Is the atd daemon running?
    – A.B
    Nov 25, 2020 at 18:12
  • Yes, the atd daemon is running.
    – Vellutante
    Nov 25, 2020 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, 2020 at 18:19
  • 1
    That's just a counter. It does not use up any resources whatsoever.
    – Kusalananda
    Nov 25, 2020 at 18:33
  • 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. Nov 26, 2020 at 16:35

1 Answer 1

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

1
  • Thanks. I checked out the duplicate post also, explained a lot.
    – Vellutante
    Nov 26, 2020 at 21:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.