date
Quick Reference
Command Name:
date
Category:
file management
Platform:
Linux/Unix
Basic Usage:
Common Use Cases
- 1
Time synchronization
Display or set the current system date and time
- 2
Formatting timestamps
Convert between different date and time formats
- 3
Script timestamping
Add timestamps to logs or output in shell scripts
- 4
Date calculations
Perform date arithmetic for scheduling and planning
Syntax
date [OPTION]... [FILE]...
Options
| Option | Description |
|---|---|
-l |
Use a long listing format |
-a |
Show hidden entries starting with . |
-h |
Human-readable sizes |
-R |
List subdirectories recursively |
Examples
How to Use These Examples
The examples below show common ways to use the date command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.