diff --git a/practise-append/output.txt b/practise-append/output.txt index 35d242b..3590903 100644 --- a/practise-append/output.txt +++ b/practise-append/output.txt @@ -1,2 +1,5 @@ A B +2022-04-07 21:49:50 +2022-04-07 21:49:53 +2022-04-07 21:50:51 diff --git a/practise-append/solution.sh b/practise-append/solution.sh index 74acdd6..ce22116 100644 --- a/practise-append/solution.sh +++ b/practise-append/solution.sh @@ -1,3 +1,4 @@ #!/usr/bin/env sh # 请在这里编写一条命令,将当前的时间追加(注意是追加,不是覆盖)到当前目录下的output.txt文件中 # 注意,你可以使用 date +"%Y-%m-%d %H:%M:%S" 得到当前的时间,大概长这个样子:2019-07-06 16:32:22 +date +"%Y-%m-%d %H:%M:%S" >> output.txt \ No newline at end of file diff --git a/practise-cp-all/solution.sh b/practise-cp-all/solution.sh index 80e6e5c..7af3c71 100644 --- a/practise-cp-all/solution.sh +++ b/practise-cp-all/solution.sh @@ -1,2 +1,3 @@ #!/usr/bin/env sh # 请在这里编写一条命令,将当前目录的src目录下所有文件和文件夹拷贝到dest目录 +cp -r src/* dest/ \ No newline at end of file diff --git a/practise-cp/solution.sh b/practise-cp/solution.sh index df9f2d7..1012eb3 100644 --- a/practise-cp/solution.sh +++ b/practise-cp/solution.sh @@ -1,2 +1,3 @@ #!/usr/bin/env sh # 请在这里编写一条命令,将当前目录的src目录下所有的.java文件拷贝到dest目录 +cp src/*.java dest/ \ No newline at end of file diff --git a/practise-ls/solution.sh b/practise-ls/solution.sh index 0eda52b..98e5875 100644 --- a/practise-ls/solution.sh +++ b/practise-ls/solution.sh @@ -1,2 +1,3 @@ #!/usr/bin/env sh # 请在这里编写一条命令,列出当前目录下的所有文件及其详情(详情使用人类能够阅读的格式显示) +ls -alth \ No newline at end of file diff --git a/practise-mkdir/solution.sh b/practise-mkdir/solution.sh index 8e238c5..d5b8456 100644 --- a/practise-mkdir/solution.sh +++ b/practise-mkdir/solution.sh @@ -1,2 +1,3 @@ #!/usr/bin/env sh -# 请在这里编写一条命令,在当前目录下创建src/main/java/com/github/hcsp目录 +# 请在这里编写一条命令,在当前目录下创建ssrc/main/java/com/github/hcp目录 + mkdir -p src/main/java/com/github/hcp \ No newline at end of file diff --git a/practise-mv/A.java b/practise-mv/A.java deleted file mode 100644 index e69de29..0000000 diff --git a/practise-mv/B.java b/practise-mv/B.java deleted file mode 100644 index e69de29..0000000 diff --git a/practise-mv/C.java b/practise-mv/C.java deleted file mode 100644 index e69de29..0000000 diff --git a/practise-mv/solution.sh b/practise-mv/solution.sh index e80bd80..26706ae 100644 --- a/practise-mv/solution.sh +++ b/practise-mv/solution.sh @@ -1,2 +1,3 @@ #!/usr/bin/env sh # 请在这里编写一条命令,将当前目录下的所有.java文件移动到当前目录下的src/main目录中 +mv ./*.java ./src/main \ No newline at end of file diff --git a/practise-remove-all/solution.sh b/practise-remove-all/solution.sh index f47ca8d..766367a 100644 --- a/practise-remove-all/solution.sh +++ b/practise-remove-all/solution.sh @@ -1,3 +1,4 @@ #!/usr/bin/env sh # 请在这里编写一条命令,将当前目录中的src文件夹删除 # 注意:使用rm命令时请务必小心!测试时一定要再三确认以免误删重要文件! +rm -r src \ No newline at end of file diff --git a/practise-remove-all/src/main/java/A.java b/practise-remove-all/src/main/java/A.java deleted file mode 100644 index e69de29..0000000 diff --git a/practise-remove-all/src/test/java/ATest.java b/practise-remove-all/src/test/java/ATest.java deleted file mode 100644 index e69de29..0000000 diff --git a/practise-remove/$A b/practise-remove/$A deleted file mode 100644 index e69de29..0000000 diff --git a/practise-remove/solution.sh b/practise-remove/solution.sh index 830e746..5b10cb1 100644 --- a/practise-remove/solution.sh +++ b/practise-remove/solution.sh @@ -1,3 +1,4 @@ #!/usr/bin/env sh # 请在这里编写一条命令,将当前目录下的名为'$A'的文件删除,但是不要影响其他文件 # 注意:使用rm命令时请务必小心!测试时一定要再三确认以免误删重要文件! +rm '$A' \ No newline at end of file diff --git a/practise-rename/solution.sh b/practise-rename/solution.sh index 20c6759..ad3a56b 100644 --- a/practise-rename/solution.sh +++ b/practise-rename/solution.sh @@ -1,2 +1,3 @@ #!/usr/bin/env sh # 请在这里编写一条命令,将当前目录下的src/main目录重命名为src/test +mv src/main src/test \ No newline at end of file diff --git a/practise-rename/src/main/A.java b/practise-rename/src/main/A.java deleted file mode 100644 index e69de29..0000000