Skip to content

Commit

Permalink
Merge pull request #66 from QU35T-code/tips2/faketime
Browse files Browse the repository at this point in the history
 Update faketime tip with examples
  • Loading branch information
Dramelac authored Oct 20, 2024
2 parents 15bfe31 + e7fb427 commit 905cf78
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 905cf78

Please sign in to comment.