delete files

Сообщения
273
Реакции
43
Помог
5 раз(а)
hello, maybe someone can explain how to delete files from root directory
example
test.php
test.php.1
test.php.2
using command rm /root/*.php removing only test.php
I use the command in cronjob */20 * * * * wget http:///lalalal/test.php so every twenty minutes creates files php.1 php.2 and etc
 
Последнее редактирование:
Сообщения
14
Реакции
0
Обратите внимание, если вы хотите заключить сделку с этим пользователем, он заблокирован
Murz,
Shell command to delete files in a directory (if that directory has no subdirectories):

rm /path/to/directory/*
This command must be executed, specifying its frequency. i.e., for “every six hours” the line in the crontab file should look something like this:

0 /6 * * * rm /path/to/directory/
i.e., at 0 minutes every six hours (second field - */6) every day of the month (third field - *) every month (fourth field - *) regardless of the day of the week (fifth field - *) execute the rm command. .. (last, sixth field).
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу