find /a/b/c/1 /a/b/c/2 -typef -mtime +3#-delete Remove the#before the-deleteonce you are sure that it is finding the files you want to remove. To have it run by cron, I would probably just create an executable script (add a shebang -#!bin/shto the top line of the file...
echo "删除服务器A完成" echo "正在删除服务器B日志..." sshpass -p "password" ssh -p portIfNot22 -o StrictHostKeyChecking=no YourAccount@YourIP -tt "cd yourSumSumFolder && for dir in yourSumFolder/*; do (find "$dir" -type f -mtime +30 -delete); done" echo "删除服务器B完成" ...
# chmod +x /opt/script/delete-old-files.sh 最后添加一个 cronjob 自动化此任务。它于每天早上 7 点运行。 # crontab -e 0 7 * * * /bin/bash /opt/script/delete-old-folders.sh 你将看到类似下面的输出。 Apache Access log files are deleted older than 20 days +---+ Oct 11 /var/log/a...
There have been many attempts in Linux to standardize configuration files for boot-time networking. The tools ifup and ifdown do so—for example, a boot script can (in theory) run ifup eth0 to run the correct ifconfig and route commands for the eth0 interface. Unfortunately, different distri...
A script runs a daemon program, which detaches itself from the script and runs autonomously. To find the PID of a service daemon, you need to use ps or some other mechanism specific to the service. In contrast, Upstart and systemd can manage individual service daemons from the beginning, ...
aws_s3_delete_bucket_with_versions.sh - deletes a bucket including all versions. Use with caution! aws_spot_when_terminated.sh - executes commands when the AWS EC2 instance running this script is notified of Spot Termination, acts as a latch mechanism that can be set any time after boot ...
The next command in the script deletes files older than 720 hours from the /var/tmp directory. This directory usually holds temporary configuration files associated with the KDE desktop environment. /usr/sbin/tmpwatch 720 /var/tmp The final command searches through caches of manpages. As a geek...
If the upgrade process encounters changed configuration files that have new versions in the release to which you are upgrading, you see a message similar to this: Configuration file '/etc/frr/daemons' ==> Modified (by you or by a script) since installation. ==> Package distributor has ship...
"rm-trash" utility puts the files you delete in a shell safely into the Trash (Recycle bin). The script is meant to be used in place of rm system command in linux . This solves accidental removals. This utility is meant to be used as an alias with rm directly and unlike other such...
The same to kernel gdbinit script, customize one for uboot: $ cp .gdb/uboot.default .gdb/uboot.user 4.7 Test Automation Use aarch64/virt as the demo board here. $ make BOARD=virt Prepare for testing, install necessary files/scripts in src/system/: $ make rootdir $ make root-insta...