BASH_SRV Telegram 84
🕵️‍♂️ Мониторим новые файлы в каталоге в реальном времени

Иногда нужно узнать, когда в определённой папке появляются новые файлы. Bash + inotifywait помогут:


inotifywait -m -e create --format '%w%f' /path/to/dir | while read NEWFILE; do
echo "🆕 Новый файл: $NEWFILE"
done


📦 Объяснение:

* inotifywait -m — постоянный мониторинг
* -e create — событие создания
* --format '%w%f' — полный путь к новому файлу
* /path/to/dir — нужная папка
* Всё новое сразу отображается в консоли

Установить inotify-tools:


sudo apt install inotify-tools


👉@bash_srv
👍9



tgoop.com/bash_srv/84
Create:
Last Update:

🕵️‍♂️ Мониторим новые файлы в каталоге в реальном времени

Иногда нужно узнать, когда в определённой папке появляются новые файлы. Bash + inotifywait помогут:


inotifywait -m -e create --format '%w%f' /path/to/dir | while read NEWFILE; do
echo "🆕 Новый файл: $NEWFILE"
done


📦 Объяснение:

* inotifywait -m — постоянный мониторинг
* -e create — событие создания
* --format '%w%f' — полный путь к новому файлу
* /path/to/dir — нужная папка
* Всё новое сразу отображается в консоли

Установить inotify-tools:


sudo apt install inotify-tools


👉@bash_srv

BY Bash Советы




Share with your friend now:
tgoop.com/bash_srv/84

View MORE
Open in Telegram


Telegram News

Date: |

Add up to 50 administrators Telegram users themselves will be able to flag and report potentially false content. 3How to create a Telegram channel? "Doxxing content is forbidden on Telegram and our moderators routinely remove such content from around the world," said a spokesman for the messaging app, Remi Vaughn. During a meeting with the president of the Supreme Electoral Court (TSE) on June 6, Telegram's Vice President Ilya Perekopsky announced the initiatives. According to the executive, Brazil is the first country in the world where Telegram is introducing the features, which could be expanded to other countries facing threats to democracy through the dissemination of false content.
from us


Telegram Bash Советы
FROM American