Операции с файламиCLI Manual
$touch
Create empty files or update file access and modification timestamps.
Синтаксис командыPOSIX Standard
touch [OPTIONS] FILE...Попробуйте в интерактивной песочнице
Клиентская симуляция без установки с мгновенным результатом.
bash — terminal
AST Sandbox (Free)
Обзор и принцип работы
`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.
Основные флаги и параметры команды
| 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. |
Практические примеры использования
#1Create multiple new empty files
touch server.js config.json .env && ls -lCreates three empty files in the current folder.
Похожие команды Linux
$findОперации с файлами
Поиск файлов и директорий в иерархии каталогов по имени, типу, размеру или дате изменения.
$catОперации с файлами
Чтение и объединение содержимого файлов с выводом в терминал.
$mkdirОперации с файлами
Create new directories and folder hierarchies.
$rmОперации с файлами
Remove files or directories from the filesystem.
$cpОперации с файлами
Copy files and directories to a destination path.
$mvОперации с файлами
Move or rename files and directories.