开发者

Unix script to compress any format of files

开发者 https://www.devze.com 2023-01-20 01:28 出处:网络
Im a new to Unix shell scripting .I have to write a Unix script A) Tofind a files in a particular directory which has got csv as well .txt

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 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消