shell 和 windows 查找文件并且压缩

How to search files and zip(Linux or Windows)

1
find ./  -name '*.tar.zf' -exec zip filname.zip {} +
1
2
3
4
5
6

Get-ChildItem -Path D:\test -Recurse -Include *.tar.gz| Compress-Archive -Verbose -DestinationPath D:\test.zip -Force

$filepath="D:\test"
$zippath="D:\test.zip"
Get-ChildItem -Path $filepath -Recurse -Include *.tar.gz| Compress-Archive -Verbose -DestinationPath $zippath -Force

参考链接

https://www.twblogs.net/a/5b7d44a32b71770a43de7828
https://www.codegrepper.com/code-examples/shell/powershell+zip+multiple+files
https://community.spiceworks.com/topic/2239060-search-for-files-and-zip

(✪ω✪)