Linux 列出指定目录下所有文件的 列表集合
直接贴出代码
1 | basepath=$1 |
1. 创建脚本
1 | touch allfile.sh |
2. 更改为可执行权限
1 | chmod +x allfile.sh |
3. 将代码拷贝到文件里面
1 | vim allfile.sh |
4. 启动
1 | ./allfile.sh [需要遍历的目录] |
评论
1 | basepath=$1 |
1 | touch allfile.sh |
1 | chmod +x allfile.sh |
1 | vim allfile.sh |
1 | ./allfile.sh [需要遍历的目录] |