Find Jobs
Hire Freelancers

Cron command to delete specific files after 16 days

$10-30 USD

Completed
Posted over 8 years ago

$10-30 USD

Paid on delivery
Summary: I want to set a cron job to run daily at 3:00am Eastern Standard Time to delete ALL (and only) .mp3 files in the /home/12345678/public_html/[login to view URL] folder (and all subfolders) that are 16 days old or older, as calculated by file modification date. I need to automatically delete specific files on my Linux shared webhosting account. I intend to use Cron Jobs via cPanel to accomplish this. I utilize a Wordpress plugin called Delightful Downloads to upload files to share with clients. After 16 days these files should be deleted from the upload directories (I have the originals offline). The files I want deleted are all .mp3's and are located inside subdirectories (for year and for month of upload). Goal: I want to set a cron job to run daily at 3:00am Eastern Standard Time to delete ALL (and only) .mp3 files in the /home/12345678/public_html/[login to view URL] folder (and all subfolders) that are 16 days old or older, as calculated by file modification date. Special note: these files are found in various year and month subfolders under the delightful-downloads/ folder. For instance /delightful-downloads/2015/07. The intended result is a string of text that I can paste into Cron Jobs in cPanel, in order to accomplish what I've outlined.
Project ID: 8276358

About the project

19 proposals
Remote project
Active 9 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hello. I would like to help yuou with this task. I done solution for you already. 0 3 * * * 0 min,3 am hour, * every day,* every month,* every week. For Centos: /bin/find For Ubuntu: /usr/bin/find 0 3 * * * /bin/find /home/12345678/public_html/[login to view URL] -type f -mtime +15 -name "*.mp3" -exec /bin/rm -f '{}' \;
$15 USD in 1 day
4.9 (1199 reviews)
7.8
7.8
19 freelancers are bidding on average $23 USD for this job
User Avatar
Dear Sir, I can make a shell script which can be run under cronjob. The purpose of this script will be to delete 16 days old mp3 files from specified folder. Please message me to discuss more about it. Thank you.
$30 USD in 1 day
5.0 (80 reviews)
5.3
5.3
User Avatar
Hi there.... im good with linux systems and scripts... i have read your project description and im confident that ican deliver
$25 USD in 1 day
4.9 (31 reviews)
5.1
5.1
User Avatar
Hi, I have tested your requirement. Please ping, I have checked and tested you requirement. Waiting for your response. Jyotir
$15 USD in 1 day
5.0 (19 reviews)
4.2
4.2
User Avatar
Dear Sir/Madam, Hi, my name is Ratko and I’m a Network Engineer from Serbia who specializes in System Administration for both Linux and Windows servers. I have 20+ years experience in network projects including system administration, design, implementation and software development. For the first 5 years of my career I worked on software development: coding and especially testing. I have a big experience in Web hosting and any kind of adjustment for hosting/DNS/web/mail settings in both physical and virtual kind of servers. My work is reliable and fast. Always prepared to go extra mile to get job done. For complete list of my skills and experience, check my profile page and my LinkedIn page. I look forward to hearing back from you about this job post and hope we can work together. My rate can be adjusted/decreased for longer ongoing working relation. Thank you for your consideration. Kind regards, Ratko Bucic
$20 USD in 1 day
5.0 (6 reviews)
3.8
3.8
User Avatar
I've been working with Linux for over 20 years. A cron job is the easiest thing to do and I must have written 100s. I could put this together quickly
$20 USD in 1 day
4.6 (9 reviews)
3.6
3.6
User Avatar
My team includes experienced sysadmins & developers who manage Cloud infrastructure(on AWS, Google Cloud, Rackspace) for various clients across globe for last 9 years. Other programming skills like ROR, Python, AngularJS, PHP. etc and automation tools used like Jenkins, chef etc. and Databases handled like Mysql, Postgresql, mongodb etc. I have understood the requirement and create the cronjob as per your requirement and setup on cpanel if required as done previously. Feel free to contact me for further discussion.
$55 USD in 1 day
5.0 (4 reviews)
2.2
2.2
User Avatar
(My bid might show 0 reviews, but that would be incorrect. Feel free to check my profile for client reviews) On my phone atm so I'll keep it short. I'll gladly help you out with this. Do you want a single line solution or is it OK to call a PHP script? The latter solution is more maintainable and flexible (and would allow for interaction with WordPress if needed)
$15 USD in 1 day
5.0 (2 reviews)
1.7
1.7
User Avatar
Hello, I'm new and have no reputation yet on freelancer, but I'd love to help you with this. I can provide the command, with an explanation for you, all readymade. To make sure it works, an alternative for testing which doesn't destroy anything, as well, of course. Cheers, nyov
$15 USD in 0 day
5.0 (1 review)
1.2
1.2
User Avatar
Dear Employer, I can write required cron command to delete specific files. I can help you to do required task. Please chat me to assign project. Thank you, Sandeep
$30 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
hello. I frequently do this job in the servers of my clients. I have plenty of experience in this class of jobs.
$15 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
Will write a bash script to monitor the folder and delete the *.mp3 files which was created more than 16 days ago. Bash script can be configured via crond to run at a dedicated time as chosen automatically (can be configured with proper access) Bash script will require permission to run automatically on the shared hosting solution (can be customized) Requires temporary access to the server to evaluate the environment.
$25 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
A proposal has not yet been provided
$25 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
I have 18 years experience of managing Linux servers, 17 of those I was technical lead at a hosting company. I was responsible for everything from specifying the hardware, installation, diagnostics, monitoring, security and in house development work. During this time I also looked after external clients servers on a contract basis. This is a straight forward "find" command with a pretty straight forward setup. I will provide 2 strings that are identical except for the first will take no action, only the second will perform the delete. The first one will allow you to test the command to ensure it does what you require and doesn't delete files you want to keep. This is a best practice solution. Once you have confirmed it does what you want you install the live version which will perform the delete for you. This is something I have done regularly over the years. I can provide references upon request. I am available for skype chat prior or during the job and I provide after contract support if required.
$15 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
A proposal has not yet been provided
$30 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
Hi, I am currently manager of various content delivery services, including downloading images, audio, video, but 'm starting as freelancer. I understand the need you have to remove the temporary files that are generated by the downloads on your site. In the same way that you plan to do it, I scheduled a programmed task through a cronjob to delete files depending on time and file type. Really it not very complicated to do this task, but be careful not to delete other files. In my experience, once configured the command, I recommend using an alternate directory with similar files and do the test, once the desired result is checked only the directory path is changed and put into production. I can help you with this project, Kind regards
$12 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
I'm system administrator at VCorp from Vietnam I managed ~300 servers, work with cronjob everyday. I can resolved this problem for you! Hire me!
$35 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
A proposal has not yet been provided
$10 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Westerville, United States
5.0
1
Payment method verified
Member since Aug 15, 2015

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.