Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update faketime tip with examples #66

Merged
merged 1 commit into from
Oct 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading