Opérations sur les fichiersCLI Manual
$touch
Create empty files or update file access and modification timestamps.
Syntaxe de la commandePOSIX Standard
touch [OPTIONS] FILE...Essayer en direct dans le bac à sable interactif
Simulation côté client sans installation avec retour instantané.
bash — terminal
AST Sandbox (Free)
Aperçu et fonctionnement
`touch` is the standard tool for quickly creating empty placeholder files or updating the access and modification timestamps of existing files to the current system time.
Options et drapeaux courants
| Flag / Option | Description |
|---|---|
| -a | Change only the access time. |
| -m | Change only the modification time. |
| -c | Do not create any files if they do not already exist. |
Exemples pratiques du monde réel
#1Create multiple new empty files
touch server.js config.json .env && ls -lCreates three empty files in the current folder.
Commandes Linux associées
$findOpérations sur les fichiers
Rechercher des fichiers et des répertoires dans une arborescence selon le nom, le type, la taille ou la date.
$catOpérations sur les fichiers
Concaténer et afficher le contenu des fichiers sur la sortie standard.
$mkdirOpérations sur les fichiers
Create new directories and folder hierarchies.
$rmOpérations sur les fichiers
Remove files or directories from the filesystem.
$cpOpérations sur les fichiers
Copy files and directories to a destination path.
$mvOpérations sur les fichiers
Move or rename files and directories.