今天一不小心在 /opt 文件夹下执行了 chmod -R 777 *
然后。。/opt下的所有软件都无法执行了
Google得知是权限的问题,文件夹默认权限755,文件默认权限664
于是编写以下脚本
#/bin/bash
#Auth: veryyoung
#Desc: chmod 目录权限为755,默认文件权限为644。
function my_chmod(){
for file2 in `ls -a $1`
do
if [ x"$file2" != x"." -a x"$file2" != x".." ];then
if [ -d "$1/$继续阅读 »
You can use xmake to run the given target and need not know where is the target program.
e.g.
We define a simple target with named 'test'.
lua
target("test")
set_kind("console")
add_files("*.c")
So, we can run it directly.
bash
$xmake r test
or $xmake run test
xmake will compile it 继续阅读 »