diff --git a/practise-append/solution.sh b/practise-append/solution.sh index 74acdd6..bf70eab 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 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..aa598f9 100644 --- a/practise-ls/solution.sh +++ b/practise-ls/solution.sh @@ -1,2 +1,3 @@ #!/usr/bin/env sh # 请在这里编写一条命令,列出当前目录下的所有文件及其详情(详情使用人类能够阅读的格式显示) +ls -lath \ No newline at end of file diff --git a/practise-mkdir/solution.sh b/practise-mkdir/solution.sh index 8e238c5..ee293cb 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目录 +mkdir -p src/main/com/github/hcsp \ No newline at end of file diff --git a/practise-mv/solution.sh b/practise-mv/solution.sh index e80bd80..bd93125 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..a198593 100644 --- a/practise-remove-all/solution.sh +++ b/practise-remove-all/solution.sh @@ -1,3 +1,4 @@ #!/usr/bin/env sh # 请在这里编写一条命令,将当前目录中的src文件夹删除 # 注意:使用rm命令时请务必小心!测试时一定要再三确认以免误删重要文件! +rm -rf src \ No newline at end of file diff --git a/practise-remove/solution.sh b/practise-remove/solution.sh index 830e746..fc4d81f 100644 --- a/practise-remove/solution.sh +++ b/practise-remove/solution.sh @@ -1,3 +1,4 @@ #!/usr/bin/env sh # 请在这里编写一条命令,将当前目录下的名为'$A'的文件删除,但是不要影响其他文件 # 注意:使用rm命令时请务必小心!测试时一定要再三确认以免误删重要文件! +rm -rf '$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