From 9fafdf9d498a255c86fd920af1a2e2334c656530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=81=A9=E6=B0=91?= <3256972080@qq.com> Date: Fri, 24 May 2024 13:07:12 +0800 Subject: [PATCH] =?UTF-8?q?20240523Linux=E6=96=87=E4=BB=B6=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...1\347\220\206\344\275\234\344\270\232.txt" | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 "\350\256\270\346\201\251\346\260\221/20240523Linux\346\226\207\344\273\266\347\256\241\347\220\206\344\275\234\344\270\232.txt" diff --git "a/\350\256\270\346\201\251\346\260\221/20240523Linux\346\226\207\344\273\266\347\256\241\347\220\206\344\275\234\344\270\232.txt" "b/\350\256\270\346\201\251\346\260\221/20240523Linux\346\226\207\344\273\266\347\256\241\347\220\206\344\275\234\344\270\232.txt" new file mode 100644 index 0000000..dba530e --- /dev/null +++ "b/\350\256\270\346\201\251\346\260\221/20240523Linux\346\226\207\344\273\266\347\256\241\347\220\206\344\275\234\344\270\232.txt" @@ -0,0 +1,67 @@ +1. 创建测试文件: + + ``` + touch .hidden.txt visible1.txt visible2.txt + ``` + +2. 列出文件和目录: + + ``` + ls -la ~ + ``` + +3. 创建工作区: + + ``` + mkdir -p work_area/project_a work_area/project_b work_area/docs + ``` + +4. 移动文本文件: + + ``` + mv *.txt work_area/docs/ + ``` + +5. 创建新文件: + + ``` + echo "Initial notes for project A" > work_area/project_a/notes.txt + ``` + +6. 复制目录: + + ``` + cp -r work_area/project_a work_area/project_b/project_a_backup + ``` + +7. 列出文件并按大小排序: + + ``` + ls -lS work_area/docs/ + ``` + +8. 删除所有文件: + + ``` + rm -f work_area/docs/* + ``` + +9. 删除目录: + + ``` + rm -rf work_area/project_b + ``` + +10. 清理空目录: + + ``` + find work_area -type d -empty -delete + ``` + +11. 创建别名: + + ``` + alias llh='ls -lh' + ``` + +· \ No newline at end of file -- Gitee