Linux script for deleting 30 day old files and generated directories
- or -
Post a project like this2579
$$$
- Posted:
- Proposals: 6
- Remote
- #1500019
- Awarded
Web developer , SEO, PHP, wordpress, joomla Codeigniter,Bootstrap,JSP,jquery , javascript,
City of London
1412750429965816305119160512606731445562
Description
Experience Level: Expert
General information for the business: web development
Description of requirements/functionality: I have files and directories which my system generates daily and I wish to delete dirs and files that are older then 30 days, please not that files and dirs are generated names
as example
I can find files to delete as
find /usr/sap/appl/ARCH/pi/ -mtime +30
gives me dirs and files
I wish to delete files and dirs that go empty, sturctures are
usr/xyz/appl/ARCH/aai/java2-messages/abc/
usr/xyz/appl/ARCH/aai/java2-messages/abc/
usr/xyz/appl/ARCH/aai/java2-messages/abc/xi_af_msg2
usr/xyz/appl/ARCH/aai/java2-messages/abc/xi_af_msg2/2017/01/wfbdhr7cbyi6nd7uaaaaynnv2g/message_7aeaf7c8-bacb-11e6-c480-00000c35b5d7_outbound.xml
the generated dirs are
usr/xyz/appl/ARCH/aai/java2-messages/abc/xi_af_msg2/2017
usr/xyz/appl/ARCH/aai/java2-messages/abc/xi_af_msg2/2017/01
/usr/xyz/appl/ARCH/aai/java2-messages/abc//xi_af_msg2/2017
/usr/xyz/appl/ARCH/aai/java2-messages/abc//xi_af_msg2/2017/01/wfbdhr7cbyi6nd7uaaaaynnv2g
all dirs and files after
/usr/xyz/appl/ARCH/aai/java2-messages/abc/ are generated dirs and files so cant be hard coded.
Specific technologies required: script on Linux platform
OS requirements: Linux
Extra notes: This can be done as a script by writing out to a ilke a text file and read and loop through file , only empty directories be deleted and only files and dirs that are older then 30 days.
Can be done shell script or another
Description of requirements/functionality: I have files and directories which my system generates daily and I wish to delete dirs and files that are older then 30 days, please not that files and dirs are generated names
as example
I can find files to delete as
find /usr/sap/appl/ARCH/pi/ -mtime +30
gives me dirs and files
I wish to delete files and dirs that go empty, sturctures are
usr/xyz/appl/ARCH/aai/java2-messages/abc/
usr/xyz/appl/ARCH/aai/java2-messages/abc/
usr/xyz/appl/ARCH/aai/java2-messages/abc/xi_af_msg2
usr/xyz/appl/ARCH/aai/java2-messages/abc/xi_af_msg2/2017/01/wfbdhr7cbyi6nd7uaaaaynnv2g/message_7aeaf7c8-bacb-11e6-c480-00000c35b5d7_outbound.xml
the generated dirs are
usr/xyz/appl/ARCH/aai/java2-messages/abc/xi_af_msg2/2017
usr/xyz/appl/ARCH/aai/java2-messages/abc/xi_af_msg2/2017/01
/usr/xyz/appl/ARCH/aai/java2-messages/abc//xi_af_msg2/2017
/usr/xyz/appl/ARCH/aai/java2-messages/abc//xi_af_msg2/2017/01/wfbdhr7cbyi6nd7uaaaaynnv2g
all dirs and files after
/usr/xyz/appl/ARCH/aai/java2-messages/abc/ are generated dirs and files so cant be hard coded.
Specific technologies required: script on Linux platform
OS requirements: Linux
Extra notes: This can be done as a script by writing out to a ilke a text file and read and loop through file , only empty directories be deleted and only files and dirs that are older then 30 days.
Can be done shell script or another
Liaquat A.
99% (20)Projects Completed
18
Freelancers worked with
10
Projects awarded
48%
Last project
1 Feb 2018
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies