Skip to content

Commit

Permalink
Update faketime tip with examples
Browse files Browse the repository at this point in the history
  • Loading branch information
QU35T-code committed Oct 20, 2024
1 parent 15bfe31 commit e7fb427
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions source/getting-started/tips-and-tricks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ Faketime manipulates the system time for a given child command. For example with
faketime 'YYYY-MM-DD hh:mm:ss' zsh
The following examples automate the synchronization of a remote domain controller's clock to initiate a corresponding zsh session.

.. code-block:: bash
faketime "$(rdate -n $DC_IP -p | awk '{print $2, $3, $4}' | date -f - "+%Y-%m-%d %H:%M:%S")" zsh
.. code-block:: bash
faketime "$(date +'%Y-%m-%d') $(net time -S $DC_IP | awk '{print $4}')"
.. note::

Here is an example of how ``faketime`` can be used.
Expand Down

0 comments on commit e7fb427

Please sign in to comment.