AWS CLI S3 从存储桶下载和上传文件
可以使用 cp 复制,或 sync 同步,或者 mv 移动
https://docs.aws.amazon.com/cli/latest/reference/s3/cp.html
单个文件的下载和上传
下载文件 aws s3 cp <S3Uri> <LocalPath>
上传文件 aws s3 cp <LocalPath> <S3Uri>
S3Uri 格式:
s3://bucket-name/object-key-or-prefix
可以使用 cp 复制,或 sync 同步,或者 mv 移动
https://docs.aws.amazon.com/cli/latest/reference/s3/cp.html
下载文件 aws s3 cp <S3Uri> <LocalPath>
上传文件 aws s3 cp <LocalPath> <S3Uri>
S3Uri 格式:
s3://bucket-name/object-key-or-prefix
记录或下载 Access Key ID 和 Secret Access Key。
Generate random characters
引用自stackoverflow:
列出指定目录下的全部文件,或可以通过扩展名指定文件类型,也可以通过指定排除规则,忽略部分文件。
目前(Python 3.8)为止,Python 并没有原生支持访问系统剪贴板。
搜寻出有几种方法,梳理如下:
简单有效。但是并不适合复杂环境。
Qt/Pyside2 读取系统剪贴板内容
function clearTimeout() {
var id = window.setTimeout(function() {}, 0);
while (id--) {
window.clearTimeout(id);
}
}
clearTimeout();通过浏览器标签(Bookmarklet方式)调用:
【ClearTimeout】 <-拖拽链接到浏览器标签栏
function getScrollTop() {
var scrollTop = 0,
bodyScrollTop = 0,
documentScrollTop = 0;
if (document.body) {
bodyScrollTop = document.body.scrollTop;
}
if (document.documentElement) {
documentScrollTop = document.documentElement.scrollTop;
}
scrollTop =
bodyScrollTop - documentScrollTop > 0
? bodyScrollTop
: documentScrollTop;
return scrollTop;
}
function getScrollHeight() {
var scrollHeight = 0,
bodyScrollHeight = 0,
documentScrollHeight = 0;
if (document.body) {
bodyScrollHeight = document.body.scrollHeight;
}
if (document.documentElement) {
documentScrollHeight = document.documentElement.scrollHeight;
}
scrollHeight =
bodyScrollHeight - documentScrollHeight > 0
? bodyScrollHeight
: documentScrollHeight;
return scrollHeight;
}
function getWindowHeight() {
var windowHeight = 0;
if (document.compatMode == "CSS1Compat") {
windowHeight = document.documentElement.clientHeight;
} else {
windowHeight = document.body.clientHeight;
}
return windowHeight;
}
//
function autoScroll() {
if (getScrollTop() + getWindowHeight() < getScrollHeight()) {
window.scrollTo({
top: window.scrollY + 5,
behavior: "smooth",
});
var timerId = setTimeout(autoScroll, 50);
// stop when click
document.addEventListener("click", (event) => {
window.clearInterval(timerId);
});
}
}
autoScroll();通过浏览器标签(Bookmarklet方式)调用,拖拽下面的链接到浏览器标签栏: