Đang Thực Hiện

146674 Shell Script Needed

Goal is to identify user files which have not been accessed in X-day, and send notification to users using mailx. Also if user haven't access files in X-days those files will be archives and removed.

Below are more details:

Looking for someone to write a shell script (.sh, .ksh) that will run on Solaris OS as a cron job. Below are the requirements:

Script will read input file called: users.txt. Here is the sample file:

username1 [url removed, login to view]

username2 [url removed, login to view]

username3 [url removed, login to view]

Basically this script need to identify "*.txt", "*.logs" files in users home directory which have not been accessed by a user in 10-days (-atime).

So working folder will be /export/home1 /export/home2 which will contain all user directories. Example find command could be:

find /export/home1 /export/home2 -atime +10 -name "*.txt" -o -name "*.logs"

So basically I want the script to find the file in user home directories which haven't been accessed in the past 10 days, and send the users an email notification using mailx. Same script will also look for similar files which have not been accessed for 15-days and these files will be moved to an archive directory and stored as a compress file ex: [url removed, login to view] or .Z

Archive functionality should have the option to be turn on and off and used on need bases only. Meaning I should have the option to run this script just for email notification purpose. Sendmail is configured on this server.

I am open for suggestions. Let me know if additional info is needed.

I need this script done fast. So hopefully someone out there already has a similar script written.

Kỹ năng: Bất kì công việc gì, Perl

Xem thêm: find directories perl, export command in shell script, example shell script, shell script or, t sh, solaris, shell script, sh, gz, find files in directory, cron script, cron command, open input file, shell script perl, perl script shell script, need option script, write script file, read txt file using access, email read notification, find files directory, ksh shell script, compress email, access read txt file, cron job email notification, read txt files access

Về Bên Thuê:
( 53 nhận xét ) Alpharetta, United States

Mã Dự Án: #1892852