21 нояб. 2012 г. · find is the common tool for this kind of task : find ./my_dir -mtime +10 -type f -delete EXPLANATIONS And take care that ./my_dir exists to avoid bad surprises! find and delete file or folder older than x days - Stack Overflow Shell script to count files, then remove oldest files Delete files that are 5 days old using bash script - Stack Overflow Другие результаты с сайта stackoverflow.com |
7 апр. 2015 г. · This will delete all the files older than 5 days which are under /path/to and its sub-directories. To delete empty sub-directories, refer to @Costas comment ... Bash script to remove the oldest file from from a folder Delete only files older than 7 days: -mtime and find How to find and delete files older than specific days in unix? Shell script to delete oldest files and folders Другие результаты с сайта unix.stackexchange.com |
18 мар. 2024 г. · Step 1: Using the find command · Step 2: Getting files that are older than x days · Step 3: Changing the output to argument form · Step 4: Removing ... |
18 мар. 2024 г. · In this tutorial, we'll look at ways to delete files by age on Linux. These commands may also work in other POSIX shells. |
24 февр. 2015 г. · I write below command to delete all files that are older than 7 days, but it doesn't work: find /media/bkfolder/ -mtime +7 -name'*.gz' -exec rm {} \; |
14 нояб. 2019 г. · I'm trying to delete old files but should keep latest 3 days log files.i tried below command, ls -tr /home/httpd/htdocs/pathname/pathname/config//build/logs/ ... Bash script to delete files older than x days with subdirectories Deleting oldest files to free space as needed on Linux Другие результаты с сайта superuser.com |
7 июл. 2024 г. · 1. Delete Files older Than 30 Days. Using the find command, you can search for and delete all files that have been modified more than X days. |
9 янв. 2018 г. · No need to write shell script. Just use find with -mtime option: CentOS Linux: Delete All *.png Files Older Than 30 Days find /home/incoming/images/ -type f - ... |
Old-Files-Delete ( old_files_delete.sh ) is a bash script to recursively delete files older than (n) number of days. run_old_files_delete.sh is a related ... |
2 мая 2019 г. · How to delete files older than a certain number days in Linux · find /mnt/directory/ -type f -mtime +4 -exec rm — {} \; · Explanation · find / ... |
Novbeti > |
Axtarisha Qayit Anarim.Az Anarim.Az Sayt Rehberliyi ile Elaqe Saytdan Istifade Qaydalari Anarim.Az 2004-2023 |