Please make sure these files are no longer needed, as it will not ask for your confirmation before deleting the files.Īre you wondering how to delete older files in your Linux system? This quick guide show you how to find and remove files older than 30 days in Linux. #FIND FILES BY DATE LINUX COMPRESS OLD HOW TO# To delete files older than 30 days on your Linux server, you need to use multiple commands together such as find command, ‘mtime’ command, ‘exec’ command and rm command. Mtime (File Last Modify Time) – mtime shows when you modify, append or update a file content. #FIND FILES BY DATE LINUX COMPRESS OLD UPDATE# The time argument consider an input value as ’24 hours’. For example, time 2 = 2*24 hours (2 days). 1) Search and Delete files older than 30 daysįirst, we will find out all files older than 30 days under the ‘/home/linuxgeek/Downloads’ directory. The below output will allow you to check whether these files are needed before they are deleted. If not, delete them using the below command. Home/linuxgeek/Downloads/preferencessystemnetwork_103783.png home/linuxgeek/Downloads/Apps-preferences-system-network-icon_31759.png home/linuxgeek/Downloads/tech_ethernet_icon_156953.png home/linuxgeek/Downloads/Teddy-320kbps-MassTamilan.io.zip home/linuxgeek/Downloads/Karnan-320kbps-MassTamilan.fm.zip find /home/linuxgeek/Downloads -type f -mtime +30 -print Hi, I need to zip the list of files using from date Stamp to end date Stamp, How can I filter and make FromDateEndDate.gzip any idea The UNIX and Linux. Once you have decided that these files are no more requires then go ahead and delete it, using one of the following command.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |