Comments (4)
coscmd 是使用 Python 标准库的 fnmatch.fnmatch
函数判断文件名是否匹配的。fnmatch
函数不会对 /
作单独处理,而是把它当作文件名的一部分,按照匹配文件名的方式进行匹配。
由此可以总结出 coscmd 通配符的常见用法如下:
- 忽略当前目录下的
index.js
文件:./index.js
- 忽略所有
index.js
文件:*/index.js
- 忽略当前目录下的
*.csv
文件:./*.csv
- 忽略所有
*.csv
文件:*.csv
- 忽略当前目录下的
test
子目录:./test/*
- 忽略所有
test
子目录:*/test/*
- 忽略所有 dot file:
*/.*
详见《腾讯云 coscmd 通配符格式》。
from coscmd.
coscmd upload path path --ignore prefix/*
from coscmd.
--include
无法找到指定目录的指定格式文件。
简单介绍一下使用 coscmd
的初衷,我想同步上传 (-s
sync), 因为 hugo 目录下包含了视频大文件 (不想上传至 github),所以在 gitignore 里剔除了。取而代之的,用 coscmd 手动单独把视频再上传一次; 因为需要保留文件层级,使用了 recursive -r
; 但需要剔除除视频文件的其他文件,所以就用了 -- include
。
操作环境: M1 MacBook Air, 11.5.1,
coscmd: coscmd 1.8.6.24
coscmd upload -rs /path/to/root/hugo-project/ / --include *.mp4,*.mov,*.webm
但返回
no matches found: *.mp4,*.mov,*.webm
/path/to/root/hugo-project/
目录下是有存在 .mp4 文件的。
@lewzylu 请问这是哪里操作出了问题吗?
from coscmd.
自问自答,macOS Shell 下需要对后缀名加双引号包括,示例:
coscmd upload -rs /path/to/root/hugo-project/ / --include ”*.mp4,*.mov,*.webm”
from coscmd.
Related Issues (20)
- coscmd install error HOT 2
- tqdm in coscmd is not thread-safe HOT 3
- 能够提供 deb 包格式的安装包吗?
- The action is not supported by the accelerate host HOT 2
- add secrect verify cmd and stop upload retry when access key or signature invalid HOT 1
- get-pip.py 404了,无法安装怎么办 HOT 2
- 不支持依次列举文件列表 HOT 4
- 是否支持同时上传多个文件 HOT 2
- coscmd -v class YAMLObject(metaclass=YAMLObjectMetaclass): SyntaxError: invalid syntax
- coscmd 没有 tab 补全
- coscmd list 目录必须加后缀 / HOT 1
- 有 python 客户端吗?
- coscmd upload
- coscmd命令报错ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+ HOT 2
- 实际使用场景缺失,比如 - coscmd delete -rf dist/
- crontab 中校验MD5会自动退出 HOT 1
- coscmd 如果实现用内网全球加速域名下载私有桶的某些文件? HOT 1
- 不支持python3.12 HOT 2
- 代理设置 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coscmd.