将当前用户家目录下的所有文件列出来 (含属性与隐藏档) 2. 在当前用户家目录下创建名为hello的空目录 3. 使用绝对路径切换到 hello 目录 4. 显示目前所在的目录 5. 删除空的hello目录 6. 创建hello.txt文件 7. 写入hello world字符串到hello.txt 8. 在hello.txt追加一行内容:I love china! 9. 查看hello.txt文件内容 10. 显示文件的/etc/man_db.conf的前5行 11. 显示文件的/etc/man_db.conf的最后5行 12. 查找系统中所有文件长度为 0 的普通文件
时间: 2023-06-19 18:07:43 浏览: 68
1. `ls -la ~`
2. `mkdir ~/hello`
3. `cd ~/hello` 或 `cd /home/用户名/hello`
4. `pwd`
5. `rmdir ~/hello` 或 `rm -r ~/hello`
6. `touch ~/hello.txt`
7. `echo "hello world" > ~/hello.txt`
8. `echo "I love china!" >> ~/hello.txt`
9. `cat ~/hello.txt`
10. `head -n 5 /etc/man_db.conf`
11. `tail -n 5 /etc/man_db.conf`
12. `find / -type f -empty`
相关问题
在当前目录下创建一个文本文件test.txt,并向其写入字符串 Hello world
好的,您可以使用以下命令在当前目录下创建一个名为 test.txt 的文本文件,并向其写入字符串 "Hello world":
```
echo "Hello world" > test.txt
```
这将创建一个新的文本文件 test.txt,并将字符串 "Hello world" 写入其中。
1.在根目录下创建一个文件夹命名为linux; 2.在根目录下创建一个文件命名为hello.t
1. 在根目录下创建一个文件夹命名为linux,可以使用以下命令来完成这个操作:
```
mkdir /linux
```
这将在根目录下创建一个名为linux的文件夹。
2. 在根目录下创建一个文件命名为hello.t,可以使用以下命令来完成这个操作:
```
touch /hello.t
```
这将在根目录下创建一个名为hello.t的空文件。如果需要在文件中添加内容,可以使用文本编辑器打开该文件,并进行编辑操作。