Giter VIP home page Giter VIP logo

Comments (4)

ayaka14732 avatar ayaka14732 commented on August 30, 2024 1

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.

lewzylu avatar lewzylu commented on August 30, 2024

coscmd upload path path --ignore prefix/*

from coscmd.

sarkrui avatar sarkrui commented on August 30, 2024

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

sarkrui avatar sarkrui commented on August 30, 2024

自问自答,macOS Shell 下需要对后缀名加双引号包括,示例:

coscmd upload -rs /path/to/root/hugo-project/  / --include ”*.mp4,*.mov,*.webm”

from coscmd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.