Which of the following commands will you use to accomplish the task?

You want to run a program in future. However, you do not want to run it more than once. Which of
the following commands will you use to accomplish the task?

You want to run a program in future. However, you do not want to run it more than once. Which of
the following commands will you use to accomplish the task?

A.
rsync

B.
at

C.
crontab

D.
sync

Explanation:

In order to accomplish the task, you will use the at command. The at command is used to set a

specific command or batch file to execute at a certain time.
Syntax:
at [option] schedule time
Several options are used with the at command. Following is a list of some important options:

The atd daemon monitors the queue of the at commands and executes them at a specified time.
Example:
The following command will create a list of jobs to be executed at 8:00 AM on 22nd August 2004.
at 08:00 22.08.2004
at> ls<enter>
at> pwd<enter>
<ctrl> + <d>
The <ctrl> + <d> key combination is used to end the list of commands.
The jobs can be removed from an at queue by using the atrm command.
Note: The at command cannot schedule recurring jobs.
Answer option C is incorrect. You will not run the crontab command, since it runs a program
repeatedly. The crontab command is used to view and edit the crontab files, which are used to
organize the cron facility. Each user has access to the
cron facility through a crontab file. Some of the frequently used crontab command options are as
follows:

Answer option A is incorrect. In computing, rsync is a software application for Unix systems. It
synchronizes files and directories from one location to another while minimizing data transfer using
delta encoding. It can copy or display directory contents and copy files, optionally using
compression and recursion.
In daemon mode, rsync listens to the default TCP port of 873, serving files in the native rsync
protocol or via a remote shell such as RSH or
SSH. In the latter case, the rsync client executable must be installed on both the local and remote
hosts.
Answer option D is incorrect. The sync command is used to flush filesystem buffers. It ensures
that all disk writes have been completed before the processor is halted or rebooted. Generally, it is
preferable to use reboot or halt to shut down a system, as they may perform additional actions
such as resynchronizing the hardware clock and flushing internal caches before performing a final
sync.



Leave a Reply 1

Your email address will not be published. Required fields are marked *