views:

29

answers:

1

Im a new to Unix shell scripting .I have to write a Unix script

A) To find a files in a particular directory which has got csv as well .txt B) Compress those files both csv and txt c)currently under that have not been modified in 1095 days d)Send a mail to the receipent

Kindly help me

+2  A: 

The commands you need to look at are:

  • find which can be used to find files (including those of a certain age (such as with the -mtime option) and name (such as -name '*.csv').
  • either compress or gzip for compressing.
  • either mail or mailx for sending mail.

Those aren't necessarily an exhaustive list of the potential programs for doing those tasks but they should be available on the vast majority of UNIX-like boxes.

If you need help with those specific commands, your best bet is to first look into executing (for example):

man gzip

to see how they work.

paxdiablo
kindly send a small unix script for reference To find a files in a particular directory which has got csv as well .txt B) Compress those files both csv and txt c)currently under that have not been modified in 1095 days d)Send a mail to the receipent
Harry
Sorry, @Harry, while I'm happy to provide general pointers and help for questions, I generally get paid for bespoke work :-) You will learn a great deal more if you attempt to do it yourself with the information I provided.
paxdiablo
@Harry SO is not a code writing service that does your homework (or worse, work that you get paid to do)
Pekka