3

I want to list using the "at" command.

I try this:

pedro@Pedro-PC:~$ ls -l | at 10:27
warning: commands will be executed using /bin/sh
job 5 at Tue Apr 20 10:27:00 2010

But doesn't work.

quack quixote
  • 43,504
user34104
  • 87
  • 1
  • 4

2 Answers2

5

Your current attempt runs the command (ls -l) and passes the resulting list of files to at. This doesn't work, because a list of files isn't a list of commands. You need to use echo.

user@host:~$ echo "ls -l" | at 10:27
warning: commands will be executed using /bin/sh
job 1 at Tue Apr 20 10:27:00 2010

You could also forget the pipe (and the quotes too):

user@host:~$ at 10:27 ls -l
warning: commands will be executed using /bin/sh
job 2 at Tue Apr 20 10:27:00 2010

The output will be mailed to you (at your local user account) after it runs.

quack quixote
  • 43,504
0

Check your local mail (you can use alpine) to see any error output from your job.