You can just use executable faketime
(from ubuntu repositories sudo apt-get install faketime
) by:
faketime -f "-15d" date
Or even fake time in whole shell by
faketime -f "-15d" bash -l
Related Contents:
- Given two directory trees, how can I find out which files differ by content? [closed]
- How can I copy the output of a command directly into my clipboard?
- How to run a shell script on a Unix console or Mac terminal?
- What is the difference between “#!/usr/bin/env bash” and “#!/usr/bin/bash”?
- Aborting a shell script if any command returns a non-zero value
- Linux: copy and create destination dir if it does not exist
- How can I assign a name for a screen? [closed]
- Command to get time in milliseconds
- What does $@ mean in a shell script?
- When should I wrap quotes around a shell variable?
- Command to change the default home directory of a user [closed]
- Add up a column of numbers at the Unix shell
- How to send data to local clipboard from a remote SSH session
- Get exit code of a background process
- What does “&” at the end of a linux command mean?
- Why doesn’t “total” from ls -l add up to total file sizes listed? [closed]
- Unix – create path of folders and file
- How to print third column to last column?
- What’s the magic of “-” (a dash) in command-line parameters?
- Get specific line from text file using just shell script
- Forcing bash to expand variables in a string loaded from a file
- Linux/Unix command to determine if process is running?
- Use find command but exclude files in two directories
- rsync not synchronizing .htaccess file
- Unix standard directory to put custom executables or scripts? [closed]
- How to find file accessed/created just few minutes ago
- When to wrap quotes around a shell variable?
- What does ‘set -e’ do, and why might it be considered dangerous?
- Append an echo to file?
- Make ls print it all on one line (like in terminal)
- dmesg time vs system time time isn’t correct
- How to pass command output as several arguments to another command
- cp -p will preserve times for some files but not all?
- Using the passwd command from within a shell script
- unix – count of columns in file
- How can I tell which Unix shell I am using? [duplicate]
- Replace the first line in a text file by a string
- What is the difference between using `sh` and `source`?
- What’s the meaning of a ! before a command in the shell?
- bash: silently kill background function process
- DIR=”$( cd “$( dirname “${BASH_SOURCE[0]}” )” && pwd )” How does that work?
- How do I know if I’m running a nested shell?
- Can you prevent a command from going into the bash shell command history? [closed]
- documenting shell scripts’ parameters
- How to attach a file using mail command on Linux? [duplicate]
- What does the `2>` mean on the Unix command-line?
- Count occurrences of character per line/field on Unix
- Using Bash Script to Find Line Number of String in File
- check if environment variable is already set [duplicate]
- Syntax error near unexpected token ‘then’