aws s3api list-objects --bucket BUCKET_NAME --output json --query "[sum(Contents[].Size), length(Contents[])]"
Retourne la taille en bytes et le nombre d'objets
Avec un ficheir qui contient le nom des bucket :
for BUCKET_NAME in $(cat s3list); do echo -n "$BUCKET_NAME " ; region=$(aws s3api get-bucket-location --bucket $BUCKET_NAME|jq '.LocationConstraint' -r); aws s3api list-objects --region $region --bucket $BUCKET_NAME --output json --query "sum(Contents[].Size)"; done
-
https://links.infomee.fr/?pbKktwIl faut utiliser l'option noresvport de mount pour que mount n'utilise pas des ports sources inférieur à 1024
Why do you have to? Tradition, mostly. Once upon a time, restricting NFS to privileged ports (<1023) was considered a security measure. Back when people were using mainframe computers, this made sure that the NFS software on the client side was part of the OS/approved by the administrator, since a program can only use a privileged port if it's run by the root user. Today, this makes no sense because anyone can own a computer and have root access, so this doesn't mean anything in terms of security.
By default, many NFS servers don't allow non-privileged source ports. Some NFS clients (such as Ubuntu's), default to using a privileged source port unless otherwise specified, which is why your Linux client works without issue. Clearly, the OS X client doesn't do this. I don't know if that was an Apple design choice or something inherited from BSD. I know that Solaris also defaults to a non-privileged port.
The two ways of avoiding this problem are, telling the OS X client to use a privileged port, as you discovered, or configuring your NFS server to allow non-privileged ports (look it up in your server's documentation).
How do you get OS X to use a privileged port using a GUI? As far as I know, you can't on versions > 10.6. One used to be able to mount NFS shares in Disk Utility and type in extra options, but that was removed. (details) It was never a simple button or anything. NFS is hardly something most of the "non-techy" crowd need, so I guess it wasn't a priority and there are reasons routinely using privileged ports isn't a great idea.
I haven't tried it, but http://www.bresink.com/osx/NFSManager.html seems to allow configuration of OS X's NFS features without the command line.
-
https://apple.stackexchange.com/questions/142697/why-does-mounting-an-nfs-share-from-linux-require-the-use-of-a-privileged-port
-
http://docs.aws.amazon.com/AmazonS3/latest/dev/example-walkthroughs-managing-access-example2.htmlfind . -perm -o+r
And the opposite :
find . ! -perm -o+r
-
https://links.infomee.fr/?fmn6vwLes splat en Ruby, l'équivalent des kwargs en python
-
https://alexcastano.com/everything-about-ruby-splats/Il parait que c'est du bon matos pas très cher par rapport à la concurrence. Je garde ça de côté.
Via Philippe
-
https://mikrotik.com/for root, dirs, files in os.walk("folder"):
for file in files:
if file.endswith(".yml"):
print(os.path.join(root, file))
with open(os.path.join(root, file), "r") as sources:
lines = sources.readlines()
with open(os.path.join(root, file), "w") as sources:
for line in lines:
sources.write(re.sub(r'pattern', 'foo', line))
-
https://links.infomee.fr/?Y803hg<meta name="viewport" content="width=device-width, user-scalable=no">
-
https://developer.mozilla.org/fr/docs/Mozilla/Mobile/Balise_meta_viewport