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开发者_如何学Python to the receipent
Kindly help me
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
orgzip
for compressing. - either
mail
ormailx
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.
精彩评论