Sunday, January 7, 2018

How to delete before some day any extensions file using one comand

Here i am giving you example .txt file example from last 10 before all file delete from any folder. here you can change file type and days.

:-  /usr/bin/find /home/test/ -name "*.txt*" -type f -mtime +10 -exec rm -f {} \;


in this comand you need to change location of your folder and file type and how many days before file you want to remove.

No comments:

Post a Comment

Installation FreeRADIUS and Daloradius on CentOS 7 and RHEL 7

SELINUX Setting:- Before installations, I recommend turning off SELinux or setting it in permissive mode:- [root@radius ~]# setenforce ...

Popular Posts