Find Jobs
Hire Freelancers

Delete files and folders with perl command

$10-30 USD

Closed
Posted over 8 years ago

$10-30 USD

Paid on delivery
Got a few servers where I need to delete millions of files and folders all the time. So I am looking for a script I can run where I add the "domains" I want to be deleted. (script should include the path), I did use the command rm -f but its too slow. So I did figure out that perl -e 'for(<*>){((stat)[9]<(unlink))}' is 15 times faster. But it only delete the files in a folder. But I got alot of subfolders. So a fast solution where I just add the domains I want deleted in a webbased interface. The server run centos 6.x. And it should not be rm -rf. But a solution that use ex. perl will be alot faster.
Project ID: 8734750

About the project

13 proposals
Remote project
Active 8 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
13 freelancers are bidding on average $37 USD for this job
User Avatar
Hello! With 98% to 99% completion rate, 850+ successfully completed projects, and a 5.00 reputation (maximum possible, 5.0) (Yes, not even 4.99 average rating, can be verified on my profile page https://www.freelancer.com/u/rajeshsonisl.html !!)... you can never go wrong choosing me :) I am available to get started on your project right away. I look forward to your reply. Thanks. Kind Regards, Rajesh Soni
$94 USD in 1 day
5.0 (635 reviews)
7.8
7.8
User Avatar
Hello, I am the premier Perl scripting expert on these freelancing sites. I will create a Perl script to process a file hierarchy to remove all files and directories below a given directory. I will place the subroutine within a Perl module (.pm file) to be called from a Perl script (.pl file) and Perl/CGI script (.cgi file) that I shall provide. A milestone payment for the full budget for this project must be deposited with this site before your offer can be accepted. Alan Idler Chief Software Architect Idleswell Software Creations
$72 USD in 3 days
4.9 (189 reviews)
6.1
6.1
User Avatar
Предложение еще не подано
$30 USD in 3 days
5.0 (4 reviews)
2.9
2.9
User Avatar
Hello, I have more than 5 yers of linux experience and I can find you easily a solution, Thank you, Adrian
$15 USD in 3 days
5.0 (1 review)
1.3
1.3
User Avatar
A proposal has not yet been provided
$25 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
See rmtree function of the File::Path module. ********************************************************************************
$30 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Sir, the Perl one-liner you mention is just a cargo-cult solution that roams around the net. The stat[9] command is useless and so is the boolean comparison operator that immediately follows. As you correctly point out, this one-liner, minus the cargo-cult part, deletes all the files in a directory quite fast, but doesn't go into the tree. To achieve deltree functionality, we would need to create a subroutine that deletes all the files, calls itself recursively upon each of the subdirectories (if present) and then deletes the subdirectory. It can be done, but i'm not sure how it would perform in case the directory tree goes very, very deep and with a lot of branches. I hope it's not the case. On a side note, it's funny how many of the bidders don't even list "Perl" among their skills.
$50 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
I have worked for 2 years in perl and knows many features. I used to to file delete and folder delete based on string and file name
$25 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
My purpose is delete the content from the directory recursively, files and subdirectories. The script accept as parameter the name of the directory and delete all the content
$20 USD in 0 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of DENMARK
Nørresundby, Denmark
5.0
4
Payment method verified
Member since Feb 26, 2006

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.