Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I wanted to schedule a job with at command and see this error:

    [root@labeir1 exm]# date
    Sun Dec  9 01:54:45 IST 2012
    [root@labeir1 exm]# at 01:47 "df -kh"
    syntax error. Last token seen: d
    Garbled time

Even the same without quotes doesn't work.

Whereas when i schedule the same command to be executed like this:

    [root@labeir1 exm]# echo df -kh | at 01:47
    job 4 at 2012-12-10 01:47

It shows that the job is scheduled, but at that particular time I don't see the output. Is it not that the output will be seen on the console?

share|improve this question

3 Answers 3

Try removing the :, so :

echo 'df -kh' | at 0147
share|improve this answer
If you think that the answer is useful, you can 'upvote' it. You can 'accept' the reply too by clicking the outline of the checkmark (will be green), this way, people searching on the website will known that the question is well answered. That's how stackechange websites works, thanks ;) – Gilles Quenot Dec 9 '12 at 11:34
The confirmation message job 4 at 2012-12-10 01:47 suggests that at is parsing the 01:47 correctly. – Scott Dec 11 '12 at 2:56

No, the output will not appear on the console.  I would expect the output to be e–mailed to you.  Try

echo df –kh | at –m 01:47

to explicitly ask for e–mail, or

echo "df –kh > df_output.txt" | at 01:47

to write to a file.

share|improve this answer

Try with something like:

mesg y # this is just to make sure you may write to your user
at now + 1 min
at>df -kh | write $USER

If that doesn't work, you either haven't got util-linux installed with pty-helper flag enabled or you need to specify the display in which you want the output (it is probably $DISPLAY)

Note that if you do something like:

at now + 1 min

It would probably work if you've got xterm installed (test it with whatever terminal you use). So, I'm guessing that the real problem is that the command is being executed in the background and you need to pull the string you want to prompt and do whatever you need with it (maybe send it to any user with write or wall commands).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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