xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

chmod +x vs chmod 755 All In One

chmod +x vs chmod 755 All In One

What is the difference between “chmod +x” and “chmod 755”?

https://askubuntu.com/questions/932713/what-is-the-difference-between-chmod-x-and-chmod-755

chmod +x / chmod 755

chmod +x === chmod 755

# chmod +x is equal to chmod ugo+x (Based on umask value)
# chmod 755 is equal to chmod u=rwx,go=rx

$ chmod +x
$ chmod 755
$ chmod u=rwx,go=rx

755

# rwx = 7
# r-x = 5
# r-x = 5

$ ls -alth
-rwxr-xr-x

777

# rwx = 7
# rwx = 7
# rwx = 7

$ ls -alth
-rwxrwxrwx

demos

npm install hooks

  • preinstall

  • install

  • postinstall

  • prepublish

  • preprepare

  • prepare

  • postprepare

https://docs.npmjs.com/cli/v9/using-npm/scripts#npm-install

# npm script
$ chmod +x ./scripts/preinstall.sh
$ chmod +x ./scripts/install.sh
$ chmod +x ./scripts/postinstall.sh

$ chmod +x ./scripts/prepublish.sh
$ chmod +x ./scripts/preprepare.sh
$ chmod +x ./scripts/prepare.sh
$ chmod +x ./scripts/postprepare.sh

# 批量 folder
# $ chmod +x ./scripts/
$ chmod +x ./scripts/*.*

image

demos

(🐞 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明这是一篇剽窃的文章,请访问 https://www.cnblogs.com/xgqfrms/ 查看原创文章!

refs

Linux & chmod 777 & chmod 777 All In One

https://www.cnblogs.com/xgqfrms/p/9546961.html

npm scripts hooks All In One

https://www.cnblogs.com/xgqfrms/p/17246038.html



©xgqfrms 2012-2021

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2020-12-30 15:30  xgqfrms  阅读(205)  评论(2编辑  收藏  举报