Online Linux Terminal Logo
OnlineLinuxTerminal
Système et processusCLI Manual

$date

Display or set system date and time.

Syntaxe de la commandePOSIX Standard
date [OPTIONS] [+FORMAT]
Communauté Linux2.4k En ligne

Échangez avec des utilisateurs Linux, apprenez des commandes et téléchargez des PDF.

Essayer en direct dans le bac à sable interactif

Simulation côté client sans installation avec retour instantané.

Ouvrir dans le terminal plein écran ↗
bash — terminal

Aperçu et fonctionnement

`date` prints or sets the system date, time, and timezone. In shell scripts, it is commonly formatted (e.g., `date +%Y-%m-%d`) to generate timestamped backup filenames and logs.

Options et drapeaux courants

Flag / OptionDescription
+%Y-%m-%dFormat output as Year-Month-Day (e.g., 2026-08-29).
-u, --utcPrint date and time in Coordinated Universal Time (UTC).

Exemples pratiques du monde réel

#1Print current date and time

Outputs the standard system timestamp.