use*_*104 3 scheduled-tasks command-line ubuntu-9.10 at
我想使用“at”命令列出。
我试试这个:
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
Run Code Online (Sandbox Code Playgroud)
但不起作用。
您当前的尝试运行命令 ( ls -l ) 并将生成的文件列表传递给at。这不起作用,因为文件列表不是命令列表。您需要使用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
Run Code Online (Sandbox Code Playgroud)
您也可以忘记管道(以及引号):
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
Run Code Online (Sandbox Code Playgroud)
输出将在运行后邮寄给您(在您的本地用户帐户中)。
| 归档时间: |
|
| 查看次数: |
8203 次 |
| 最近记录: |