mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-16 22:49:19 +00:00
Update cheatsheets
This commit is contained in:
21
linux/faketime
Normal file
21
linux/faketime
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# faketime
|
||||
|
||||
> Fake the system time for a command.
|
||||
> More information: <https://manned.org/faketime>.
|
||||
|
||||
- Fake the time to this evening, before printing the result of `date`:
|
||||
|
||||
`faketime '{{today 23:30}}' {{date}}`
|
||||
|
||||
- Open a new `bash` shell, which uses yesterday as the current date:
|
||||
|
||||
`faketime '{{yesterday}}' {{bash}}`
|
||||
|
||||
- Simulate how a program would act next Friday night:
|
||||
|
||||
`faketime '{{next Friday 1 am}}' {{path/to/program}}`
|
||||
Reference in New Issue
Block a user