How to create a ZIP file in Shell?

Asked

Viewed 82 times

1

How do I create a ZIP file in Shell with the files of today’s date? The files are all in the same directory.

  • Have you tried anything? Know the commands zip, find and man?

  • I was using the compress-Archive

  • But I was having trouble getting the files with today’s date

1 answer

0

You can try something like:

find . -ctime -1 -iname "*. txt" -exec zip.zip files {} \;

find has some interesting options to search for files based on the date of creation, access and modification. Take a look at his man.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.